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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Diverging colors background based on measure

Hi all, 

 

First time questioner, but I have already used this community for so many questions so thanks for that! 🙂

 

My question, I would like to write a DAX measure that has diverging colors (like in the settings below) as an output in order to use "format by field value" instead of "format by color scale". 

 

breuwer_0-1629291541909.png

I would like this since I have to implement these backgrounds for many visuals in my report. 

 

Requirements: 

Lowest value is color #EE4B2B
Midpoint is a fixed number: 100 and is color #FFFFFF

Highest value is color #00A36C
The measurement difining the value is a simple sales index, let's call it [Sales Index].

Any pointers are much apreciated!

Kind regards, 

Bas

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi,  @Anonymous 

What you need is hard to achieve in powerbi. If you want to format by field value, then you inevitably have to mark a color for each unique value.、

 

I'm afraid that currently you can only manually set the background conditional formatting one by one.

 

Best Regards,
Community Support Team _ Eason

 

 

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi,  @Anonymous 

What you need is hard to achieve in powerbi. If you want to format by field value, then you inevitably have to mark a color for each unique value.、

 

I'm afraid that currently you can only manually set the background conditional formatting one by one.

 

Best Regards,
Community Support Team _ Eason

 

 

amitchandak
Super User
Super User

@Anonymous , filed value can have absolute colors.

Unless you have some logic to create diverging colors

 

mean based on number you can calculate some number

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 Solution Authors