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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BeingAslam
Frequent Visitor

Card Value Negative red and Positive Green

Dear friends, I want my value to turn red when it is negative and green when it is positive.

This value is current year - (minus) last year

 

BeingAslam_0-1701332441227.png

 

Regards

2 ACCEPTED SOLUTIONS
Ahmedx
Super User
Super User

do it like in the screenshot

Screenshot_3.png

View solution in original post

Ritaf1983
Super User
Super User

Hi @BeingAslam 
You can create a measure like :

flag = if (sum('Table'[value])> 0,1,0)
And then modify the conditional formatting of the card value according to this measure :
Ritaf1983_0-1701333481531.png

 

Result

Ritaf1983_1-1701333505598.pngRitaf1983_2-1701333533706.png

PBIX is attached

Please note :
it is not recommended to use traffic light colors to emphasize messages, as people with color blindness do not see a difference between red and green. Therefore, it is recommended to use combinations of blue and red, and not green and red.
For more information about color issues please refer :
 
 

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

10 REPLIES 10
Ritaf1983
Super User
Super User

Hi @BeingAslam 
You can create a measure like :

flag = if (sum('Table'[value])> 0,1,0)
And then modify the conditional formatting of the card value according to this measure :
Ritaf1983_0-1701333481531.png

 

Result

Ritaf1983_1-1701333505598.pngRitaf1983_2-1701333533706.png

PBIX is attached

Please note :
it is not recommended to use traffic light colors to emphasize messages, as people with color blindness do not see a difference between red and green. Therefore, it is recommended to use combinations of blue and red, and not green and red.
For more information about color issues please refer :
 
 

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi Ritaf this is solution not work properly, suggest another.

This solution should work perfectly according to the description,
If it is not, please share the dummy file to check why.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

I have a measure which is adding current year sales minus last year, but when I apply filter then this condition is not working properly.

Ahmedx
Super User
Super User

do it like in the screenshot

Screenshot_3.png

Hi Ahmed this is solution not work properly, suggest another.

explain why it doesn't work

I have a measure which is adding current year sales minus last year, but when I apply filter then this condition is not working properly.

screenshot to the studio so we can understand you

and when you change the filter, does the measure give the correct result?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.