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
Anonymous
Not applicable

Conditional formatting for 0 values

Hi,

 

I have a conditional formatting based on a measure that basically indicates the variartion respect last year value.

Captura.PNGIt works perfectly well except when this measure is exaclty 0 (no variation respect last year), then instead of showing yellow it shows black. I also tried working with color scale instead of rules and seting up the default formatting in yellow but it does not work either with 0 values. Is this a bug? Someone experiencing the same?

 

Thanks 🙂

 

3 REPLIES 3
jameslballard
Regular Visitor

I have a similar issue.

 

I have a measure that works out an overdue rate between 0 and 1. This could be zero under two conditions: all tasks are complete or the due date is not yet past today's date. I have set the measure to be a "Decimal Number" and have tried several formats for it.  

Measure.png

 

I then have a date and traffic light indicator, which are separate cards that show the due date. 

Date and traffic light.png

 

The data labels for these are coloured based on the following conditional formatting rules (the date is formatted based on the measure):

format rules.png

 

For any non-zero value this works fine, however when the value is zero it default to blue text. If I change the measure to add an aribitrary 0.000001 and adjust the rules then the conditional formatting will be green for near zero values, which is my workaround for this ruleset.    

 

There is an exception on exactly zero.

Nathaniel_C
Community Champion
Community Champion

Hi @Anonymous ,

Ran a test. You may want to test that zero in your set is actually a number. Or even add another field that lets you test that.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel

 

condition2.PNG

 

 

condition1.PNGcondition.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Sorry I don't understand what do you mean by running a test. The values for the conditional formatting are given by a measure not a column. 

 

Thanks for the answer anyway 🙂

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.

Top Solution Authors