Forum Discussion
Conditional formatting for 0 values
Hi, Claudioffj
It might have something to do with the way Power BI interprets measures or formatting rules. Here are a few steps to troubleshoot and resolve the issue:
Ensure that the measure calculations with a value of 0 are accurate. Sometimes, even subtle differences in calculations can cause conditional formatting to behave unexpectedly. Double-check that the measure actually returns 0 and not a very small number close to 0 or .
Although your utterances look correct, it's worth reviewing the conditional formatting rules in the Power BI interface to make sure they're logically consistent with the utterance. For a detailed guide to setting up conditional formatting, see the official documentation here:
Apply conditional table formatting in Power BI - Power BI | Microsoft Learn
Make sure that the data type of the measure and its aggregation status, if any, are compatible with the conditional formatting rules. The incompatibilities here can sometimes lead to unexpected formatting results.
If the problem persists after following these steps, it may be helpful to explore alternatives to the implementation logic, such as using calculated columns or different DAX functions that may handle 0 values more explicitly in the context of conditional formatting.
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Claudioffj2 years agoRegular Visitor
Hi Anonymous
Yes, the result is indeed 0. If the value for the current month and the previous month is 0, the conditional formatting does not work.
My variation measure is a simple calculation of current month - previous month.
The results are as follows:
Current Month = 10 - Previous Month = 5 = 5 => formatting OK
Current Month = 0 - Previous Month = 5 = -5 => formatting OK
Current Month = 0 - Previous Month = 0 = 0 => formatting does not work