Forum Discussion
Conditional formatting
Hi guys,
How can I set the green colour for when it's '-'/negative and red when it's '+'/positive?
I'm not sure if the is correct, can you please advice?
Thanks!
Hi ROG,
You could try this:
if value >= 0 Number and < 100 Number then red
if value >= -100 Number and < 0 Number then green
Let me know if this works 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
8 Replies
- tackytechtomMost Valuable Professional
Hi ROG,
You could try this:
if value >= 0 Number and < 100 Number then red
if value >= -100 Number and < 0 Number then green
Let me know if this works 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- ROGResponsive Resident
Hello tackytechtom thanks for your reply.
I have done it as you said, but as you can see below it didn't work as expected. Can you advice?
- tackytechtomMost Valuable Professional
Hi ROG ,
Hm, in your description it says "How can I set the green colour for when it's '-'/negative and red when it's '+'/positive?"
Your screenshot looks like this or am I missing something?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
- gaurav-lakhotiaHelper I
Hi ROG ,
Make the entered values consistent. Either use Number or use Percent. While using Number, enter 53% as 0.53. - HotChilliCommunity Champion
Remove what you've got.
Try
<0 number green
>0 number red
- dharmendars007Memorable Member
Hello ROG ,
Set the first rule for negative values like below
1. If value is less than "0", then choose a Green color.
Set the second rule for positive values
2. If value is greater than or equal to "0" then choose a Red color.
If you find this helpful , please mark it as solution which will be helpful for others and Your Kudos/Likes 👍 are much appreciated!
Thank You
Dharmendar S
- AnonymousNot applicable
Hi ROG ,
Thanks for all the replies!
And ROG , you can also try to use this DAX to create a measure:Measure = SWITCH( TRUE(), SELECTEDVALUE('Table'[Net Churn Rate MoM Var]) > 0, "red", SELECTEDVALUE('Table'[Net Churn Rate MoM Var]) < 0, "green" )Then set the conditional format as below:
Output:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.