The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

hierarchy automation by Iterative macro

Meghnagupta
8 - Asteroid

I have uploaded 1 file Hierarchy_Template which is Input file in this.

 

1st we have to put filter on Type = Profit center

 

Then we have the data which will pick ID.

Afterwards we need to pick "ID" column value say "74226" then we will pick it's Parent ID "43420" this will be hierarchy 1

and then we will search 43420 in "ID" column again and pick parent ID "43388" this will be hierarchy 2

again we will search "43388 in "ID" column and pick parent ID till we get P001

which searching till P001 we will remove filter of Profit Center

 

and then it will pick next "ID" after putting filter of Profit center

 

Is this possible in Alteryx?

Can someone help me creating this workflow?

15 REPLIES 15
Kottapally_Ramesh
8 - Asteroid

Attached is the workflow as per your requirements. 

Meghnagupta
8 - Asteroid

@binu_acs : could be very silly question, but when I try to individually place these files in my share drive and change base input file macro shows an error

 

Meghnagupta_0-1765543110117.png

How do configure this?

 

binu_acs
21 - Polaris

@Meghnagupta Save the macro in the shared drive, then in the Alteryx Designer canvas right-click and insert -> macro from the saved location

 

binu_acs_0-1765544989399.png

 

 

Meghnagupta
8 - Asteroid

Thank you @binu_acs  @Kottapally_Ramesh  for your help!
accepted as solution for both. This has been a great help to me.

Meghnagupta
8 - Asteroid

@binu_acs  : I again have a question question here

Say in Input file we add 1 more column naming "Description" in front of all the values. 

How do we get that? Do we need 1 more macro for that? or changes in current macro will also work?

binu_acs
21 - Polaris

@Meghnagupta You don’t need a new macro, you can update the existing  macro to include the new field 

Labels
Top Solution Authors