Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
We have a hierarchy following the classic parent/child design. Each record has a field for its own parent. We know how to use the PATH to calculate levels. We have seen how to make this work in a matrix. The problem we have is that unlike the typical employee or chart samples where the field identifier is meaningful to an end user to drill (name), in our case our hierarchy is made up of ID field, each record having a description. Asking an end user to drill on an ID without a description will not work. What we really want is to display the heirarchy in a table, where each row shows the ID, description, and other fields, and drill to the children of that record. It is textual data so a chart is not appropriate. In the example below we would want to see each record alone at each drill level, and both children together. Is this possible?
ID Parent Label
01 Null Grand Parent
02 01 Parent
03 02 Child
04 02 Another Child
@Anonymous,
Have you tried the following found in the pattern example @ https://www.daxpatterns.com/parent-child-hierarchies/:
HierarchyPath = PATH(Table1[ID],Table1[Parent]) HierarchyDepth = PATHLENGTH ( Table1[HierarchyPath] ) Level1Label = LOOKUPVALUE ( Table1[Label], Table1[ID], PATHITEM ( Table1[HierarchyPath] , 1, 1 ) ) Level2Label = IF ( Table1[HierarchyDepth] >= 2, LOOKUPVALUE ( Table1[Label], Table1[ID], PATHITEM ( Table1[HierarchyPath] , 2, 1 ) ), Table1[Level1Label] ) Level3Label = IF ( Table1[HierarchyDepth] >= 3, LOOKUPVALUE ( Table1[Label], Table1[ID], PATHITEM ( Table1[HierarchyPath] , 3, 1 ) ), Table1[Level2Label] )
The pattern example also explains how to use a technique to hide the unecessary aggregation that is show in the visual (e.g. [BrowseDepth] & [MaxLevelDepth])
What I've provided will display the following in a matrix:
Proud to be a Super User!
Hi @Anonymous,
If I understand your requirement correctly, you'd like to show the details of each level due to they are all numerical IDs. Is it? Maybe you can try the page tooltip. Please refer to power-bi/desktop-tooltips.
Best Regards,
Dale
Dale,
Unfortunately custom tooltips are not supported for tables or matrices, only charts. Even if they were, it would mean we would present a screen of meaningless numbers on a single column matrics where the only way to understand them would be to hover over each one.
- Pete
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
103 | |
98 | |
98 | |
38 | |
37 |
User | Count |
---|---|
154 | |
120 | |
73 | |
73 | |
63 |