Forum Discussion
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
- Greg_DecklerCommunity Champion
Haleem - How many of these do you have? Might be better just to type it. Failing that, you would need to do something to count the spaces at the beginning of text for each row and use that to compute the position in the hierarchy and then go from there. Ugly.
- HaleemHelper III
Greg_Deckler I have more than 1000 rows in the hierarchy which is constantly updating everytime a new cost center is placed into it. It's impossible to type it manually. Yes It's ugly that's why I am here 🙂
- Greg_DecklerCommunity Champion
Haleem - Can you post sample source data as text?
- HaleemHelper III