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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.