Forum Discussion

Vasudeva-cv19's avatar
Vasudeva-cv19
Regular Visitor
9 months ago
Solved

Having issue with Ragged hierarchy in matrix visualization

In Power BI, we are trying to create a hierarchy for organizational roles (e.g., Level 1 → Level 2 → Level 3 → Level 4 → Claim Team → Handler). However, the data is not uniform:

  • Some records only have up to Level 2
  • Others stop at Level 3
  • A few go as deep as Level 6

The problem is that visuals like Matrix tables or Tree Maps still reserve space for all levels, resulting in blank rows or columns for missing levels. This seems to be related to how Power BI handles ragged hierarchies.

 

Can any one help me here 

 

  • v-achippa's avatar
    v-achippa
    8 months ago

    Hi Vasudeva-cv19,

     

    Thank you for the response. This behaviour is expected because the Matrix visual does not support true ragged hierarchies. Unfortunately it cannot hide empty hierarchy levels automatically and no DAX filter can override that behaviour.

    To display the hierarchy without blanks, the data needs to be reshaped so that only the levels that actually exist are used in the visual. Please follow below steps:

    • Use Power Query and unpivot Level_1 to Level_6 and remove the blank values. This shows a clean parent-->child structure and the Matrix will show the hierarchy correctly without empty spaces.
    • If you cannot change the shape, please create a single Path column like combine only the non-blank levels into a single text for example like Vasudeva > Mayur > Caarly > ADAMAS. Then use this Path column in the matrix or table. It avoids all blank levels because the path is built only from existing values.

     

    Thanks and regards,

    Anjan Kumar Chippa

11 Replies

  • this is my sample data where some of them have level 6 and some of the stopped at level 1 or level 2

    Level_1_TeamLevel_2_TeamLevel_3_TeamLevel_4_TeamLevel_5_Teamclaim_team_nameHandler_nameActive Claims Dates
          ANDREW-DANE FAIRCLOUGH2
          CLIVE BUTCHER1
          EMMA SARDESON1
          KEITH BATTSON1
          TING LOW1
          WILL EVANS1
         HistoricALLEGRA SANTOMAURO1
         HistoricLYNETTE JEN1
         HistoricPATRICK MURPHY1
         HistoricSHAMICA ALEONG1
         UNCODED/OTHERCARLY ROBINSON1
    VasudevaColmPAUL  AviaJONNA HOLM206
    VasudevaColmPAUL  AviaJOSEPH MCCULLOUGH53
    VasudevaColmPAUL  AviaKILEY HACKER1
    VasudevaColmPAUL  AviaMARTIN REED123
    VasudevaColmPAUL  AviaMASON ALBA60
    VasudevaColmPAUL  AviaOLIVIA VISEE32
    VasudevaColmPAUL  AviaPATTY PARTHEYMULLER73
    VasudevaColmPAUL  AviaQUENTIN KAREIVA1
    VasudevaColmPAUL  AviaRONALD KELEMAN179
    VasudevaColmPAUL  AviaSUBROGATION EXAMINER99
    VasudevaMayurPAUL  AviaZOE GARRISON1
    VasudevaMayur   DSERIC LEVINE3
    VasudevaMayur   DSMARJORIE THOMPSON35
    VasudevaMayur   DSRICHARD TOWLE12
    VasudevaMayur   DSROBERT RICCOBONO22
    VasudevaMayurCaarly  CaarDAVID COLWICK5
    VasudevaMayurCaarly  CaarERIKA MASCARO5
    VasudevaMayurCaarly  CaarJOANNE WAYMAN138
    VasudevaMayurCaarly  CaarKEVIN FISHER27
    VasudevaMayurCaarlyADAMAS DoheDAVID LEVESQUE168
    VasudevaMayurCaarlyADAMAS DoheDAVID RETTIG1
    VasudevaMayurCaarlyADAMAS DoheDOEXCESS SEGMENTATION10
    VasudevaMayurCaarlyADAMAS DoheFFIONA MCDONOUGH202
    VasudevaMayurCaarlyADAMAS DoheJAMES SIEWERT225
    VasudevaMayurCaarlyADAMAS DoheJOSEPH GIRDUSKY113
    VasudevaMayurCaarlyADAMAS DoheTRACY MONTALBANO234
    VasudevaMayurCaarlyADAMASJOSEPH GirduANTHONY ZALESKI207
    VasudevaMayurCaarlyADAMASJOSEPHGirduROBERT ISABELLA118
  • This is my sample data -- I need Vasudeva-->Mayur ..> + Carly  +

                                                                                              + Paul   +

    Like this hierachy without blanks are needed Greg_Deckler 

    • Greg_Deckler's avatar
      Greg_Deckler
      Community Champion

      Vasudeva-cv19 So why not a selector measure like the following? 

      Selector Measure =
        VAR __Level_3_Team = SELECTEDVALUE( 'Table'[Level_3_Team] )
        VAR __Level_4_Team = SELECTEDVALUE( 'Table'[Level_4_Team] )
        VAR __Level_5_Team = SELECTEDVALUE( 'Table'[Level_5_Team] )
        VAR __Result = IF( __Level_3_Team = BLANK() || __Level_4_Team = BLANK() || __Level_5_Team = BLANK(), 0, 1 )
      RETURN
        __Result

       

      Put that measure in your Visual level filter and set the filter to equal 1. Then the unwanted rows should disappear from the matrix.

      • v-achippa's avatar
        v-achippa
        Community Support

        Hi Vasudeva-cv19,

         

        Thank you for reaching out to Microsoft Fabric Community.

         

        Thank you Greg_Deckler for the prompt response. 

         

        As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user for the issue worked? or let us know if you need any further assistance.

         

        Thanks and regards,

        Anjan Kumar Chippa

  • its classic ragged hierarchy problem ..Some out of box resoultion required as we have balnks at multilevels