Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Macro

MSB1711
5 - Atom

Hello, can anyone help me with the Iterative macro?

Ask: I have a list of IDs that need to be looked up and create a parent-child relationship. Here are the IDs I need to look up

123

234

345

456

111

 

Start ID :123 and END ID: 999

Original Data

Original data.png

Final Output

Final Output.png

 

The logic for getting Level column and PATH

Parent ID and Child ID are on LEVEL 1. The Child ID now becomes the PArent ID and its Child ID will come down to level 2. The New parent ID will have multiple child IDs. For eg: 345 is a child ID with a Parent ID having Level 1.So now 345 will have Level 1 +1= Level 2. 111 Child ID has Parent ID 345 having Level 2, so now 111 will have Level 2 +1 = Level 3

Thank you!

 

2 REPLIES 2
danilang
19 - Altair
19 - Altair

Hi @MSB1711 

 

Look at the multiple solutions to Weekly Challenge 12:Creating an HR Hierarchy.   These should be enough to get you started down the correct path

 

Dan

MSB1711
5 - Atom

Hi, Thanks for your reply. I will look into it

Labels