Forum Discussion
TheDrDetroit
2 years agoRegular Visitor
conditional formatting colors when comparing values
I'm formatting colums to change colors when compared to a planned value. If it's lower it turns red, if it's higher it turns green. When the cells are empty the default to not being less that...
- 2 years ago
With the help of MageVortex this is the DAX that worked:
Color March = IF ( COUNT ( 'KPI' [Actual] ) = BLANK(), "#FFFFFF", IF ( MAX ( 'KPI' [Actual] ) < MAX ( 'KPI' [Plan] ), "#E68F96", "#BBF4C6" ))
You have to use the hex code for the colors, I made the mistake of not entering a hashtag before the color code and it created an error. Thanks for your help MageVortex.
TheDrDetroit
2 years agoRegular Visitor
Color mar = IF ( COUNT ( 'KPI' [Mar-Actual] ) = BLANK(), "#FFFFFF", IF ( MAX ( 'KPI' [Mar-Actual] ) < MAX ( 'KPI' [Mar-Plan] ), "#BBF4C6" , "#E68F96"))