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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
tracytran91
Helper III
Helper III

Hide Blank at the 2nd level of hierarchy in matrix

Hi friends, 

 

I would like to have a DAX measure which helps me to hide the blanks of coverage measure at the second level of hierarchy,  but NOTE HIDE blank of coverage measure at 1st level hierarchy AND DOES NOT AFFECT the GRAND TOTAL in the end of matrix.  

 

tracytran91_0-1629196916914.png

tracytran91_0-1629257413015.png

 

@amitchandak He helped me out to hide the blank at 2nd level. However, It needs to work on how not to hide the blank at the 1st level. Here is the measure: 

 

 

GrandTotal = 
VAR NewTotal = if(isblank([Coverage]), blank(), [Total])
RETURN 
if(isinscope(Product[Code]), NewTotal, [Total])

 

 

 

Could anyone help me regarding this issue?

I highly appreciate your help!!

Thank you in advance. 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@tracytran91 , You need to use two measures one for total and one for sub total

 

Current is [Total]

 

New Total = if(isblank([covergae]), blank(), [Total])

 

Final Total = if(isinscope(Table[Market level 2]),  [New Total], [Total])

 

Use the correct second level column name 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
tracytran91
Helper III
Helper III

@amitchandak Thank you for your help. 

Your solution works perfectly for the 2nd level of hierarchy. However, my data - at the 1st level of hierarchy has blank, therefore the number of total measure is incorrect. 

 

Could you please help me solve it out? 

tracytran91_0-1629257218229.png

 

amitchandak
Super User
Super User

@tracytran91 , You need to use two measures one for total and one for sub total

 

Current is [Total]

 

New Total = if(isblank([covergae]), blank(), [Total])

 

Final Total = if(isinscope(Table[Market level 2]),  [New Total], [Total])

 

Use the correct second level column name 

https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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