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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bhmiller89
Helper V
Helper V

Conditional Formatting Issues

I have a matrix that uses many different data points, all $dollars or perents.

 

I need to show anything negative (<0) as the Font Color Red. 

 

When I attempt conditional formatting, I am only presented with the option of "if value is greater than or equal to", "if value is greater than" "if value is blank" and then it always makes me pick a second condition. 

 

I literally just need to say "if <0, red, else black" 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@bhmiller89 , You create a color measure like

Color sales = if(AVERAGE(Sales[Sales Amount])>0,"green","red")

And in conditional formatting use field option and choose this measure

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

View solution in original post

v-xuding-msft
Community Support
Community Support

Hi @bhmiller89 ,

 

I agree with amitchandak. You could use a measure to implement it. 

Measure = IF([Percentage]<0,"Red","Black")

2.gif

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @bhmiller89 ,

 

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from the thread.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-xuding-msft
Community Support
Community Support

Hi @bhmiller89 ,

 

I agree with amitchandak. You could use a measure to implement it. 

Measure = IF([Percentage]<0,"Red","Black")

2.gif

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello,

 

using conditional formatting you can apply a single condition:

rule.jpg

amitchandak
Super User
Super User

@bhmiller89 , You create a color measure like

Color sales = if(AVERAGE(Sales[Sales Amount])>0,"green","red")

And in conditional formatting use field option and choose this measure

https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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