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.
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.
- MarkD17222 years agoResolver I
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.