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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
lamlam24
Frequent Visitor

Conditional Formatting on Values that are = 0, < 0 and > 0.

In my 

1 ACCEPTED SOLUTION
Uzi2019
Super User
Super User

Hi @lamlam24 

use below dax for conditional formatting


Color 4am= If(Sum( value)=0,"Green", If(sum(value)<0, "Red", "Yellow")
It gives you 3 color


but you have written red in both condition then formula would be this


Color 4am= If(Sum( value)=0,"Green", "Red")

 

then put this value under Cell element > background color

Uzi2019_0-1714979098062.png

 

 

then select fied the seect your measure

Uzi2019_1-1714979158478.png

 

 

I hope I answered you question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

View solution in original post

2 REPLIES 2
Uzi2019
Super User
Super User

Hi @lamlam24 

use below dax for conditional formatting


Color 4am= If(Sum( value)=0,"Green", If(sum(value)<0, "Red", "Yellow")
It gives you 3 color


but you have written red in both condition then formula would be this


Color 4am= If(Sum( value)=0,"Green", "Red")

 

then put this value under Cell element > background color

Uzi2019_0-1714979098062.png

 

 

then select fied the seect your measure

Uzi2019_1-1714979158478.png

 

 

I hope I answered you question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!
MNedix
Super User
Super User

Hi,

This should be quite easy and straight forward - see link below:

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-conditional-table-formatting 

 

If this answered your question then please mark it as the solution so others can see it.



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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