Forum Discussion

Arshadjehan's avatar
Arshadjehan
Icon for Helper I rankHelper I
6 years ago
Solved

Not displaying the sub levels if only one sub level in Matrix visual

Hi,  Matrix visual as shown below , displays the sub level details even if there is only one sub level.  I want to hide the sub level if there is only one sub level, in this case to display only up...
  • v-frfei-msft's avatar
    6 years ago

    Hi Arshadjehan ,

     

    Sorry for misunderstanding your request. Here we cannot filter the matrix directly, we can create measure to work on it.

     

     

    sum of be = 
    VAR dis =
        DISTINCTCOUNT ( 'Table'[sub2] )
    var be = SUM('Table'[BE])
    var a = IF(dis = 1
                && ISINSCOPE ( 'Table'[sub2] )
                && OR (
                    SUM ( 'Table'[Release] )
                        = CALCULATE ( SUM ( 'Table'[Release] ), ALL ( 'Table'[sub2] ) ),
                    SUM ( 'Table'[Release] ) = 0),TRUE())
    var  b = 
    IF(dis = 1
                && ISINSCOPE ( 'Table'[sub2] )
                && OR (
                    be
                        = CALCULATE ( be, ALL ( 'Table'[sub2] ) ),
                    be = 0),TRUE())
    
    
    RETURN
        IF (
            a&&b,
            BLANK(),be
            
        )
    

     

     

     

    For more details, please check the pbix as attached.