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
M_SBS_6
Helper V
Helper V

Measure add colours based on results

Hi, 

I have a simple measure test1 - test2.

 

What I want is my card to return the value in a colour based on the output.

 

If < 0 the hex #ed6955 else hex #87b826

 

Any idea how to incorporate this please? 

1 ACCEPTED SOLUTION
mickey64
Super User
Super User

For your reference.

 

mickey64_0-1723119384269.png

 

mickey64_1-1723119421108.png

 

View solution in original post

2 REPLIES 2
aduguid
Super User
Super User

I'd create a measure for the conditional formatting 

CardColor = 
IF (
    [test1] - [test2] < 0,
    "#ed6955",
    "#87b826"
)
mickey64
Super User
Super User

For your reference.

 

mickey64_0-1723119384269.png

 

mickey64_1-1723119421108.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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