I have a data table that is basically a hierarchy based on columns like this,
[table="width: 500, class: grid"]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 4[/td]
[td]Level 5[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 3[/td]
[td]Level 3[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 4[/td]
[td]Level 4[/td]
[/tr]
[/table]
And so forth... basically such that each row entry lists one of the items, and ... then for each column identifying the various levels, if the column level is beyond the level of that row entry, it just repeats. I know that's explained poorly but I'm hoping the table illustrates the point.
I cannot change how this data comes in... but I want to create a pivot table of hierarchies with this. The problem is all the repeat entries, for instance, the entirety of row 1 is essentially a duplicate, and therefore in a pivot, it just drills down into identical levels, so it should be excluded. Basically, only rows displaying the lowest level of detail should be kept. One complexity that I didn't show is that level 4 might not always be the lowest level of detail; it can vary by line.
Is there any good way to do this?
[table="width: 500, class: grid"]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 4[/td]
[td]Level 5[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[td]Level 1[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[td]Level 2[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 3[/td]
[td]Level 3[/td]
[/tr]
[tr]
[td]Level 1[/td]
[td]Level 2[/td]
[td]Level 3[/td]
[td]Level 4[/td]
[td]Level 4[/td]
[/tr]
[/table]
And so forth... basically such that each row entry lists one of the items, and ... then for each column identifying the various levels, if the column level is beyond the level of that row entry, it just repeats. I know that's explained poorly but I'm hoping the table illustrates the point.
I cannot change how this data comes in... but I want to create a pivot table of hierarchies with this. The problem is all the repeat entries, for instance, the entirety of row 1 is essentially a duplicate, and therefore in a pivot, it just drills down into identical levels, so it should be excluded. Basically, only rows displaying the lowest level of detail should be kept. One complexity that I didn't show is that level 4 might not always be the lowest level of detail; it can vary by line.
Is there any good way to do this?