Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Arshadjehan
Helper I
Helper I

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 upto "Provincial" level , coz values is same in only one sub level i.e. "ADP (Provincial)"

 

Hierarchy Issue.png

 

 

 

 

 

 

 

Any Help ?

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

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
        
    )

 

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

3 REPLIES 3
v-frfei-msft
Community Support
Community Support

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
        
    )

 

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @Arshadjehan ,

 

Please enable the option "show items with no data " for the rows in your matrix visual.

show.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft  I probably couldnt make you understand what I want!

I want to hide the sub level, if there is only one sub level, and to show as parent level only.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.