Forum Discussion
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.
b) when there is formatting in the measure for Gross/Sales%, 0.0% appears:
Is there a way I can remove both 0 and 0.0% at the same time?
Thank you.
I worked it out
5 Replies
- melanie-gFrequent Visitor
I worked it out
- AnonymousNot 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 - MahyarTFMemorable Member
Hi,
Please try the below filters :
Appreciate your Kudos
- melanie-gFrequent Visitor
Hi, thank you for your response.
That will not work for me because both the $ amount and % are calculated using the same measure.
- mahoneypatMicrosoft 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