Forum Discussion
webportal
1 year agoImpactful Individual
A simple conditional formatting rule
Hello, I would like a conditional formatting rule, like: Red if the value of the measure is negative Green otherwise Please illuminate me: Thank YOU!
Anonymous
1 year agoNot applicable
Hi webportal ,
Please try creating a new measure:
Color =
VAR __diff = DIVIDE([ThisYear], [PrevYear])-1
VAR __result = IF(__diff < 0, "Red", "Green")
RETURN
__result
And apply it to the field value:
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
webportal
1 year agoImpactful Individual
Hello Anonymous
Ok, but then for each measure I want a conditional formatting, I'll need another measure.
There should be a better way.