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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors