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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Good morning,
I have a specific requirement:
In a Power BI Matrix I need to add a dynamic gradient color scale based on the min and the max sales per Chain & MarginType.
I've managed to create a gradient color scale, based on the min and max sales for all shops, however, I need to have the min and max values per cluster of Chain and Margin Type.
I've used this measure to achieve this:
| Shop | Sales |
| A | 10 |
| B | 20 |
| C | 30 |
| D | 40 |
Shop A and D are the sames chain and MarginType. Min = 10, max = 40
Shop B and C are the same chain and MarginType. Min = 20, max = 30
The Matrix contains the shopName in the rows and sales in the values. On the values I need to apply conditional formatting.
It doesn't matter if only a few shops are selected or all. The color scale should always be the same.
In this case I would need 2 color scales because I have 2 different clusters.
So based on the example the coloring should look like this:
Is something like this even possible?
yes, background color is controllable via functions. You can create another measure that computes the desired color for each of your matrix value cells, and use that measure as the driver for the backgroud color.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!