Forum Discussion
How to build a tree/hierarchy based on IDs?
- 8 years ago
Because, given your original table Table1, all you would have to do would be
PATH(Table1[SpaceName], Table1[ParentName])
You don't need to use the ID's, it will work perfectly fine with the textual columns as long as they are distinct.
Your understanding is correct.
At my second level, I get: Path=1000|1100
I would like it to be displayed as "Domain | Kingdom"
At the 7th level 1000|1100|...1600|1700 displayed as "Domain|...Genus|Species".
I tried your suggestion of
PATH(Table1[SpaceName], Table1[ParentName])
Which is how they demonstrated the behavior in that article using peoples names, but I get no output when I use it?
Not sure if I'm supposed to be adding it differently, but when I add a new column under the Data view (which is where I built my path based on ID's), I get no output.
Strange. I just replicated your data and used the same exact formula and it works for me.
- nick-evans8 years ago
Advocate I
I have no clue what happened, but after relaunching Power BI Desktop, it does, in fact, work in the way you said it should.
I have exactly what I'm after! Thanks so much :D
- erik_tarnvik8 years ago
Solution Specialist
My pleasure, glad to help!