Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parent-Child Iterative Macro

NeilFisk
9 - Comet

I have been working with data that has multiple levels of a parent-child relationship that I want to display in a way to use with Tableau visually.  I can do this successfully by copying and pasting the code and drilling down to the next level each time until there are no records left in an outer join.  This, however, doesn't seem like the right way to do it, so I looked online to see if there were any options.  Although there seem to be some, they don't seem to work.  I tried to do this myself, but something isn't working. 

 

Attached in the YXZP file is an example of both what works (within the tool container captioned "Example without Macro" and the Iterative Macro that does not work (within the tool container captioned "Attempt with Iterative Macro".  The goal would be to loop through the macro as many times as necessary to match all the records and create columns as displayed in the Browse tool for the "Example without Macro".  

 

Is there someone that can take a look at the Iterative Macro and see what I'm doing wrong?

Thanks!

Neil

3 REPLIES 3
patrick_digan
17 - Castor
17 - Castor

@NeilFisk See if the attached is close to what you're looking for. It's getting the right number of records now compared to your without macro path. The iterative macro now has 2 inputs, and I changed the way it was renaming Level. I also handled the first level differently.  

 

 

image.png

NeilFisk
9 - Comet

Patrick,

 

Sorry for the late reply.  This is what I ended up doing!

 

Thanks,
Neil

RAM-ler
6 - Meteoroid

Hello I am still a beginner in Alteryx but I seem to have somehow more or less the same promlem as you... maybe my problem is a bit easier...I would appreciate your help: in the table below I have written the Child ID... and I want a workflow that gets me the respectiv Parent ID, which is mostly build as the Child ID but without the last segment (see table below). How can I do that dynamically? Do you have a good idea for that?  

Child ID Parent ID
#BK.C1.C001.#BK.C1.
#BK.C1.C001.Q1.#BK.C1.C001.
#BK.C1.C001.Q1.FO1.#BK.C1.C001.Q1.
#BK.C1.C001.Q1.FO2.#BK.C1.C001.Q1.
#BK.C1.C001.Q1.FC1.#BK.C1.C001.Q1.
#BK.C1.C001.Q1.FC2.#BK.C1.C001.Q1.
#BK.C1.C001.Q1.FDO.#BK.C1.C001.Q1.
#BK.C1.C001.Q51.#BK.C1.C001.
#BK.C1.C001.Q51.FO1.#BK.C1.C001.Q51.
#BK.C1.C001.Q51.FC1.#BK.C1.C001.Q51.
#BK.C1.C001.Q51.FC1.#BK.C1.C001.Q51.
#BK.C1.C001.Q51.FDO.#BK.C1.C001.Q51.
Labels
Top Solution Authors