Forum Discussion
Conditional Formatting with diff requirements
- 4 years ago
Hi Anonymous ,
Please try the measure.
Color = VAR target = CALCULATE ( SUM ( Roles[Days Open Target] ), TREATAS ( VALUES ( 'Table'[Job Level Des] ), Roles[Roles] ) ) RETURN IF ( SUM ( 'Table'[Days Opened] ) > target, "red", "green" )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Please try the measure.
Color =
VAR target =
CALCULATE (
SUM ( Roles[Days Open Target] ),
TREATAS ( VALUES ( 'Table'[Job Level Des] ), Roles[Roles] )
)
RETURN
IF ( SUM ( 'Table'[Days Opened] ) > target, "red", "green" )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Never mind, I was able to fix it. The Days Open Target was in Text on my file. I switched it to whole number. Appreciate the help! Is there a way I can use other colors aside from Green/Red? Can I put in Hexa codes?
- v-kkf-msft4 years agoCommunity Support
Hi Anonymous ,
Yes, you can. You just need to change the color to the desired Hexa codes, like this.
Color = VAR target = CALCULATE ( SUM ( Roles[Days Open Target] ), TREATAS ( VALUES ( 'Table'[Job Level Des] ), Roles[Roles] ) ) RETURN IF ( SUM ( 'Table'[Days Opened] ) > target, "#E389B9", "#288BA8" )Best Regards,
Winniz