Forum Discussion

Jayway's avatar
Jayway
New Member
10 months ago
Solved

Request: Support for Ragged Hierarchies

Hi,   We work with large hierarchies (like multi-level charts of accounts) and run into issues when using the Matrix visual and standard slicers:   Blank levels show up as extra nodes in Matrix ...
  • Ilgar_Zarbali's avatar
    10 months ago

    Challenge Recap

    • You’re working with ragged hierarchies (uneven depth, like Chart of Accounts or Org Trees).
    • Issues in Power BI today:
      • Matrix shows blank rows for missing child levels.
      • Standard slicers don’t allow proper hierarchical filtering (expand/collapse, hide blanks, select only leaf nodes).
      • Workarounds often involve custom visuals like Hierarchy Slicer, Smart Filter Pro, or custom matrix visuals.

    1-Built-in Options (Limited)

    • Matrix visual:
      • Currently no native “hide blanks” toggle.
      • Blanks will show unless you flatten the hierarchy with DAX / Power Query.
    • Native slicers:
      • Only support flat or simple hierarchies, no expand/collapse.
      • No “end-node only” selection.

    2-Workarounds (No Custom Visuals)

    • DAX Parent-Child Functions
      Use PATH() and related functions to model hierarchies:
      Path = PATH ( Accounts[ParentID], Accounts[AccountID] )

    Then calculate hierarchy levels with:

    Level 1 = PATHITEM ( Accounts[Path], 1 )
    Level 2 = PATHITEM ( Accounts[Path], 2 )
    Level 3 = PATHITEM ( Accounts[Path], 3 )

    • These create explicit levels.
    • You can then remove blanks using measures or filters in visuals.

     

    • Hide Blanks in Matrix

    Create measures that return BLANK() when no data exists → these rows collapse naturally in visuals.

    • Leaf Node Filtering
      Add a column that flags whether a node is a leaf (no children), and filter slicers by that column.

     

    IsLeaf =
    IF (
    ISBLANK (
    CALCULATE (
    COUNTROWS ( Accounts ),
    Accounts[ParentID] = EARLIER ( Accounts[AccountID] )
    )
    ),
    1,
    0
    )

     

    3 - Custom Visuals (Practical Today)

    Until Microsoft ships ragged hierarchy improvements, many use:

    • Hierarchy Slicer (free, marketplace) → expand/collapse, hide blanks, leaf-only.
    • OKViz Smart Filter Pro → advanced filtering, hierarchy navigation.
    • xViz Hierarchy Tree (paid) → advanced org chart style navigation.

    4 - Roadmap / Community Voice

    • This feature is one of the top voted items on Power BI Ideas forum (hide blanks in hierarchies, ragged hierarchy support).
    • Microsoft has acknowledged it’s important but hasn’t yet committed to a release timeline.
    • Best way to influence: vote on the idea + comment with scenarios.
      (Finance, HR, product, sales reporting all rely heavily on this).

     

    Summary

    • Native Power BI still lacks smooth ragged hierarchy handling.
    • Workarounds: DAX PATH() modeling + blank-filtering.
    • Practical fix today: Hierarchy Slicer or similar custom visuals.
    • Roadmap: not yet officially announced, but highly requested.

     


    Your kudos is highly appreciated. If it helps you to solve your challenge, I would be happy if you accept it as a solution.