Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have the following conditional formatting setup. I am basically trying to camouflage any result of zero with the background color. Any blanks should become zeros based on my measure. I thought I had this working properly at one point, but now I appears that my zeros don't change colors. My measure is:
Thanks.
Mark
Solved! Go to Solution.
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.
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.
Thank you for your contribution. So, strangely, I simply removed and reapplied the conditional formatting, making it simply "if value = 0" then change the color and removing any "if blank" conditions I had (which should have been inconsequential). On some others I had to add another condition to make the color white if it is other than zero because of dark backgrounds which provide little contrast (i.e., because the default font color is black) . So, I don't believe anything I did was really different, but it did produce a different result, so I am moving forward and not thinking too hard about it. Thanks again.
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 !!
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
111 | |
96 | |
96 | |
67 | |
63 |