Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ROG
Responsive Resident
Responsive Resident

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?

 

ROG_0-1728649339828.png

ROG_1-1728649471058.png

Thanks!

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

8 REPLIES 8
Anonymous
Not 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:

vjunyantmsft_0-1728886844243.png

Output:

vjunyantmsft_1-1728886857985.png


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.

dharmendars007
Super User
Super User

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

LinkedIN 

HotChilli
Super User
Super User

Remove what you've got.

Try

<0 number green

>0 number red

tackytechtom
Super User
Super User

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

ROG
Responsive Resident
Responsive 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?

 

ROG_0-1728899577451.pngROG_1-1728900135745.png

 

 

Anonymous
Not applicable

Hi @ROG ,

Could you please reconfirm exactly what your needs are? According to your original requirement, you wanted it to be green when the value was less than 0 and red when it was greater than 0

 green colour for when it's '-'/negative and red when it's '+'/positive

And you did achieve that in the results you gave, so what do you mean by it didn't work as expected?

vjunyantmsft_0-1729058118840.png


Best Regards,
Dino Tao

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/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Hi @ROG ,

Make the entered values consistent. Either use Number or use Percent. While using Number, enter 53% as 0.53.

gauravlakhotia_0-1728650164552.png

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.