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

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

Reply
Emma_
Helper I
Helper I

Dynamic formatting color scale

Hello, I am looking for an option to create a dynamic formatting based on the scale defined by min and max value of my sales measure. At the moment the scale is just a static image so depending on the selected/filtered values colors are not the most accurate. This is used for a shape map. Do you know if I could create this scale dynamically with any visual? Setting up rules and tresholds will not work because the ranges change a lot depending on the selection. Thats why I would like to incorporate min & max measures. Thanks a lot!

Emma__0-1760621705667.png

 

1 ACCEPTED SOLUTION
KNP
Super User
Super User

There's not really enough detail to provide a good solution.

But, rather than thinking about the rules as ranges or thresholds, you could treat them as percentage of totals ranges.

Then use a SWITCH statement to define the colors between these percentages. That way, the colors will respect the values based on selection.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!

View solution in original post

3 REPLIES 3
KNP
Super User
Super User

There's not really enough detail to provide a good solution.

But, rather than thinking about the rules as ranges or thresholds, you could treat them as percentage of totals ranges.

Then use a SWITCH statement to define the colors between these percentages. That way, the colors will respect the values based on selection.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
xOIEmaj

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
image
fabric-SUbadge
Proud to be a Super User!
Emma_
Helper I
Helper I

@srlabhe thanks for the tip. I will try this. can you elaborate on this? where/in which way should I actually use it?

Then use this Flag is conditional formatting for selection of colors.

 

thank you

srlabhe
Helper V
Helper V

Hi 

Create measure called flag with below formula

Flag=if [Sales] >=MIn(Sales) and [Sales]<= Max(Sales) then 1 else 0 end

Then use this Flag is conditional formatting for selection of colors.

 

Hope it helps.

Thanks

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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