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
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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors