Forum Discussion
conditional formatting colors when comparing values
- 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.
Can you do a nested if?
Nested Color Mar = IF ( 'KPI' [Mar-Actual] = "000000", IF ( MAX ( 'KPI' [Mar-Actual] ) < MAX ( 'KPI' [Mar-Plan] ) , "#BBF4C6", "#E68F96" )
Granted, 000000 may be the wrong value to use. Just a thought, let me know if it fails 🙂
It's giving me an error message, it's asking to specify an aggregation, min, max, count, sum
- MageVortex2 years agoHelper I
Sorry, I forgot to finish the equation, it should have read more akin to:
IF ( 'KPI' [Mar-Actual] =BLANK(), "000000", IF (blahblahblahOr perhaps a
0
in place of
BLANK()That may not help the report I was testing with is my own and set up differently than yours. If you must use min max or sum, you can just try sum = 0 or something like that.
Hope that helps.- TheDrDetroit2 years agoRegular Visitor
I tried COUNT and SUM, they're not working, the error message says there are too many arguments for the funciton.
- TheDrDetroit2 years agoRegular Visitor
Thank you for your help!