Forum Discussion
Conditional Formatting not working as expected
- Anonymous2 years ago
Hi MarkD1722 ,
I create a table as you mentioned.
Then I create a measure and here is the DAX code.
Measure = CALCULATE ( COUNTX ( FILTER ( 'Table', 'Table'[Column] = "Y" ), 'Table'[Column] ) )When I add Conditional formatting and I think you can let value to be blank.
So when it is blank, it will be the right color.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
It seems like you're encountering an issue with conditional formatting not properly applying the background color to cells with zero values in your report. This might be due to the way the conditional formatting rule is configured.
Here are some steps you can take to troubleshoot and potentially resolve the issue:
1. **Check Conditional Formatting Rule**: Ensure that the conditional formatting rule you've set up is correctly configured to apply the background color when the value is zero. Double-check the conditions and formatting options to make sure they match your requirements.
2. **Evaluate Measure Output**: Verify that your measure, "HUB - Status Count," is indeed returning zero values for cells where the count is zero or blank. You can do this by adding the measure to a table or matrix visual and examining the results.
3. **Test Formatting with Static Values**: As a troubleshooting step, try applying the conditional formatting rule to a static column or measure that you know should contain zero values. This will help determine if the issue lies with the conditional formatting rule or the measure output.
4. **Adjust Formatting Options**: In Power BI, conditional formatting allows you to customize various formatting options, including background color, font color, and font style. Double-check the formatting options you've selected to ensure they are set up correctly for applying the background color.
5. **Refresh Visual**: After making any changes to the conditional formatting rule or measure, refresh the visual containing the data to see if the formatting updates accordingly. Sometimes, the visual may need to be refreshed for the changes to take effect.
By following these steps and ensuring that both the measure output and conditional formatting rule are configured correctly, you should be able to resolve the issue with applying background color to cells with zero values in your Power BI report. If you continue to experience problems, feel free to provide additional details, and I'd be happy to assist further!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !!