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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.