Start Free Trial

Alteryx Designer Desktop Discussions

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

converting a table to a hierarchy

Faixal
5 - Atom

Hello Alteryx Community,

I need your expertise and guidance! I'm currently trying to convert a table to a hierarchical format. My dataset consists of items, parents, and other attributes(please see the table below)

ItemParent
A 
BA
CA
DA
EB
FB
GC

I want to flatten it so that it is easy to see and identify the relationships between items. The output format doesn't matter much to me as long as I can quickly identify the hierarchy. I tried creating an output similar to either of the outputs below.

Level 1Level 2Level 3
A  
 B 
  E
  F
 C 
  G
 D 

or 

Level 1Level 2Level 3
A  
AB 
ABE
ABF
AC 
ACG
AD 

 

I tried using macros to iterate over the whole dataset but failed miserably. Honestly, I don't think my logic was sound, hence why I'm not going to provide it here. Please help me.

 

Note: I don't know how many levels my data has as I have thousands of rows but it's definitely more than 10.

1 REPLY 1
Raj
16 - Nebula

@Faixal 
find workflow attached
mark done of solved.

Labels
Top Solution Authors