Hi,
I am trying to take hierarchical data and expand it out for each "level" in the hierarchy based on a legend. My initial thought was to somehow run it through an iterative macro, counting down the level until I reach the bottom layer of the hierarchy. I am having some trouble wrapping my head around if this approach makes sense and how to append the entries together. Please see below an example of my data, my desired result, and my rough attempt at creating the workflow needed.
I would greatly appreciate any help or ideas on how to transform this data. Thanks.
Input data (simplified IDs for demonstration)
| ID | Value | Level | Immediate_Parent |
| 1-4 | 91 | 4 | 1-3 |
| 2-6 | 56 | 6 | 2-5 |
Desired result (simplified IDs for demonstration)
| ID | Value | Level | Immediate_Parent |
| 1-4 | 91 | 4 | 1-3 |
| 1-3 | 91 | 3 | 1-2 |
| 1-2 | 91 | 2 | 1-1 |
| 1-1 | 91 | 1 | |
| 2-6 | 56 | 6 | 2-5 |
| 2-5 | 56 | 5 | 2-4 |
| 2-4 | 56 | 4 | 2-3 |
| 2-3 | 56 | 3 | 2-2 |
| 2-2 | 56 | 2 | 2-1 |
| 2-1 | 56 | 1 | |
Attempt
