Forum Discussion
simtali
2 years agoFrequent Visitor
Displaying a hierarchical table in a matrix
Greetings all.
I am trying to display a table with this structure (Level_1_ID, Level_2_ID, and Level_3_ID form a hierarchy)...
| Level_1_ID | Level_2_ID | Level_3_ID | Name | Amount |
| A1 | A1 Name | |||
| A1 | B1 | B1 Name | 1 | |
| A1 | B1 | C1 | C1 Name | 2 |
| A1 | B2 | B2 Name | 4 |
...in a matrix that looks like this:
| Level_1_ID | Level_2_ID | Level_3_ID | Name | Amount |
| - A1 | A1 Name | 6 | ||
| - B1 | B1 Name | 2 | ||
| C1 | C1 Name | 2 | ||
| + B2 | B2 Name | 4 |
I've encountered two challenges.
- Since the table contains rows for non-leaf nodes of the hierarchy, I end up with extra "total" rows. In other words, the table already contains records for the "total" rows (though they don't actually contain totals).
- I'd like the total rows to use the Name from the row for that level instead of the (first or last) Name of one of the child rows.
Is it possible to produce this output given this table? Or could the table be reformatted so that this output is possible?
Thanks for any assistance.
Yeah, that's a tall ask. Best you can do with moderate effort is
or maybe
Anything beyond that will have rapidly diminshing return on investment.
1 Reply
- lbendlin
Super User
Yeah, that's a tall ask. Best you can do with moderate effort is
or maybe
Anything beyond that will have rapidly diminshing return on investment.