Forum Discussion

Haleem's avatar
Haleem
Helper III
6 years ago

Flatten One-column Hierarchy into a Table

What I have (Table 1)

I have cost center hierarchy from SAP extracted excel file. This hierarcy is all in one Column as shown below with various levels (Table 1). The lowest level of the hierarchy is a 5-digit cost center  (unique numbers).

 

What I would like to have (Table 2)

I would like to flatten this one-column hierarchy into a table as shown on the right side. I need to start in reverse order, so the cost center will be the last level of the hierarchy and then going backward  to capture each level as shown in table two. Please remember that the Table 2 should be dynamically updating each a new cost center is added to the table 1. There is no standard for on which level the cost center should be placed, so business division have many layer before reaching to a cost center and other are just on 3rd or 4th level as shown in the table 1. 

 

17 Replies