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
ThomasSan
Helper IV
Helper IV

Conditional formatting is not displaying 0 correctly

Hi everyone,

 

I am trying to introduce conditional formatting for my percentage value in order to better show whether our various sales figures have increase or decreased. In order to do that, I would like to keep the + sign before the percentage value. See the example below:

ThomasSan_0-1690880894688.png

As you can see, the percentage value of International Sales and All Sales are behaving as intendend i.e. - sign to show that International Sales have decreased by 18%, + sign to show that All Sales have increased by 6%. However, when sales remain flat, I am unable to have only a 0 shown in front of my percentage value as can be seen above.

 

I have my percentage measure formatted as follows:

ThomasSan_1-1690881116416.png


The dax for my measure does not contain any further formatting code:

CM %delta Our Sales = 

var cyOurSales=
[CM CY Sales]

var pyOurSales=
[CM PY Sales]

var div=
SWITCH(
    TRUE(),
    ISBLANK(cyOurSales)&&ISBLANK(pyOurSales),
    BLANK(),
    cyOurSales = 0,
    -1,
    DIVIDE(
        cyOurSales,
        pyOurSales,
        BLANK()
    ) -1
)

return div

 

Does anyone know why PowerBI is not working as expected. What can I do in order to have the measure format the values as desired i.e. +5%, 0%, -5%?

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

Hi ,  @ThomasSan 

According to your description, you use the "+#%;-#%;0%" in the format of the measure , but it returns the "+%" in your visual , and you want to show the "0%" for it .

I test it  in my side , it may be caused by the measure value is very small but it is a  positive number,like this:

vyueyunzhmsft_0-1691043647539.png

This is the "+#%;-#%;0%" judgement just have three conditions: Positive number, negative number and 0.

If you want to when the measure return value is very small you can add a logic in your measure to return 0:

Measure = IF(ABS( SUM('Table'[Column1]) ) < 0.01 ,0 , SUM('Table'[Column1]))
 
Then we can get the value like this in the visual:

 vyueyunzhmsft_1-1691043846690.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi ,  @ThomasSan 

According to your description, you use the "+#%;-#%;0%" in the format of the measure , but it returns the "+%" in your visual , and you want to show the "0%" for it .

I test it  in my side , it may be caused by the measure value is very small but it is a  positive number,like this:

vyueyunzhmsft_0-1691043647539.png

This is the "+#%;-#%;0%" judgement just have three conditions: Positive number, negative number and 0.

If you want to when the measure return value is very small you can add a logic in your measure to return 0:

Measure = IF(ABS( SUM('Table'[Column1]) ) < 0.01 ,0 , SUM('Table'[Column1]))
 
Then we can get the value like this in the visual:

 vyueyunzhmsft_1-1691043846690.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Hi! Yes, the problem appears for digits that are being rounded down. It is baffeling to me that when a value is being rounded down to a 0 value, the displayed value is not picking up the formatting for a 0 value.

 

However, your solution was helpful in displaying 0 values as desired! Thanks you

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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