We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Iterative Macro Help

craigja
11 - Bolide

I think I need to create an iterative macro... I have a set of data like in the example below, I need to somehow get from the base Task_ID 2324701 to the top level and pull out the Icon Code. You can see that it all links up via Task_ID -> Parent_Project_Id -> Task_Id -> Parnet_Project_Id etc all the way to the top

 

 

Task_Id  Icon_Code  Parent_Project_Id
2324635  FLNICA  
2324650                    2324635
2324681                    2324650
2324701                    2324681

11 REPLIES 11
phottovy
13 - Pulsar
13 - Pulsar

Hi @craigja,

 

I imagine my approach is similar to @Hsandness macro. My output includes a few additional fields, including the full hierarchy for visibility and the number of levels to get to the top parent level:

Basic Iterative Macro.png

 

Updated:

I added a few more tools after the macro to keep only the lowest level per Ultimate Parent ID:

Basic Iterative Macro 2 .png

craigja
11 - Bolide

Thanks folks, for all your help!  Marked Phottovy as the solution as that one just worked out the box, the other macro timed out on my dataset after 100 iterations (its a massive dataset!).  

Labels
Top Solution Authors