The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.