Forum Discussion
Help Needed with Visualizing Managerial Headcount Hierarchy in Matrix – Handling Variable Depths
- 1 year ago
Hi katina,
Thank you for your follow up.
Please find attached a screenshot and a revised sample PBIX file that may help resolve the issue:
We hope the information provided is useful. If you have any further queries, please feel free to contact the Microsoft Fabric community.Thank you.
This usually happens when the hierarchy has a fixed depth, so shorter manager paths show null values. A couple of options you can try:
Instead of expanding all hierarchy levels, create a calculated column or measure that only shows non-blank levels. For example, you can use ISBLANK() or IF( NOT ISBLANK([Manager]), [Manager]) logic to hide nulls.
Another option is to unpivot the hierarchy columns into a normalized table, so the matrix only expands to the actual number of levels that exist for each manager.
Alternatively, you could create a custom hierarchy using Parent–Child DAX functions (PATH(), PATHITEM()) and only display levels up to PATHLENGTH() for that manager.
This way the matrix dynamically adjusts and avoids showing extra null rows.
Hope this helps! If it solves your issue, please mark it as the solution !!
Thanks Nabha-Ahmed for your suggestions!
How do I apply the parent-child DAX to the visual? As I create a calculated column to my organization table - where shall I use for example the PATHLENGTH() column? I feel a bit lost as I don't figure out where shall I place these custom measures / columns 😶