Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everyone,
I'm looking to see if its possible to highlight a matrix in Power BI as per the following:
I need to highlight a 'qty' column' based on the corresponding supplier column with different colours for each supplier.
I'd like to avoid adding a drill down row and instead use a quick colour visual like this:
Good result:
Would like to avoid needing to drill down:
Example Table:
Item | Qty | Supplier | Date |
A | 213 | 1 | 2025-01-05 |
B | 576 | 2 | 2025-01-06 |
C | 5463 | 3 | 2025-01-10 |
D | 34 | 4 | 2025-01-14 |
E | 67 | 5 | 2025-01-04 |
Solved! Go to Solution.
Hi @jt_123 ,
Thanks for Greg_Deckler reply.
You can create a measure
Color =
IF(
ISFILTERED('Table'[Item]) && NOT ISFILTERED('Table'[Supplier]),
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[Supplier]) = 1,"Green",
SELECTEDVALUE('Table'[Supplier]) = 2,"Red",
SELECTEDVALUE('Table'[Supplier]) = 3,"Blue",
SELECTEDVALUE('Table'[Supplier]) = 4,"Purple",
SELECTEDVALUE('Table'[Supplier]) = 5,"Yellow"
),
"#RRGGBB00"
)
Apply the meausre to conditonal formating of Background color
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @jt_123 ,
Thanks for Greg_Deckler reply.
You can create a measure
Color =
IF(
ISFILTERED('Table'[Item]) && NOT ISFILTERED('Table'[Supplier]),
SWITCH(
TRUE(),
SELECTEDVALUE('Table'[Supplier]) = 1,"Green",
SELECTEDVALUE('Table'[Supplier]) = 2,"Red",
SELECTEDVALUE('Table'[Supplier]) = 3,"Blue",
SELECTEDVALUE('Table'[Supplier]) = 4,"Purple",
SELECTEDVALUE('Table'[Supplier]) = 5,"Yellow"
),
"#RRGGBB00"
)
Apply the meausre to conditonal formating of Background color
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@jt_123 I would create a measure that returns the appropriate color codes, "#000000" based upon the MAX('Table'[SupplierDate]). You could then use that with the Field value option for conditional formatting.