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

View all the Fabric Data Days sessions on demand. View schedule

Reply
melanie-g
Frequent Visitor

Formatting to hide zeroes

Hi there

 

Hope someone can help.

 

I have a measure that calculates Gross Profit and Gross/Sales %, where I have formatted the Gross/Sales % as a percentage. 

 

My results are either whole numbers or percentages. 

 

When the results for either Gross Profit or Gross/Sales % are zero, I want to be able to remove them from the matrix view. However when I try to do this via the filters, only the 0 is hidden, not the 0.0%. 

 

Is there a way I can hide both at the same time?

 

a) When there is no formatting in the measure, zeros are hidden because all results are a number.

melanieg_3-1663031417496.png

 

melanieg_2-1663031229504.png

 

b) when there is formatting in the measure for Gross/Sales%, 0.0% appears: 

 

melanieg_4-1663031473811.png

melanieg_5-1663031516018.png

 

Is there a way I can remove both 0 and 0.0% at the same time?

 

Thank you.

 

 

 

 

 

 

1 ACCEPTED SOLUTION
melanie-g
Frequent Visitor

I worked it out

 

melanieg_0-1663036336763.png

 

View solution in original post

5 REPLIES 5
mahoneypat
Microsoft Employee
Microsoft Employee

Three suggestions:

1. You can just use SWITCH instead of SWITCH(TRUE() in this case.

2. When you create all those variables, you are likely hurting performance as you are generating all measures everytime.

3. You should learn about Calculation Groups to get your desired functionality. You could then do a conditional format string, after you return BLANK() for any results that = 0 (before formatting).

 

Pat

 

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


melanie-g
Frequent Visitor

I worked it out

 

melanieg_0-1663036336763.png

 

MahyarTF
Memorable Member
Memorable Member

Hi,

Please try the below filters :

MahyarTF_0-1663033664018.png

 

Appreciate your Kudos

Mahyartf

Hi, thank you for your response.

 

That will not work for me because both the $ amount and % are calculated using the same measure.

Anonymous
Not applicable

Hi @melanie-g 

This might not be the best solution. But have you tried filtering to show only percentages that are more than 0%

Dax_Noob

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors