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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jt_123
New Member

Can you highlight values in a matrix in PBI based on a different column?

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:

jt_123_0-1737144177309.png

 

Would like to avoid needing to drill down:

jt_123_1-1737144230220.png

 

Example Table: 

ItemQtySupplierDate
A21312025-01-05
B57622025-01-06
C546332025-01-10
D3442025-01-14
E6752025-01-04
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

vheqmsft_1-1737338089811.png

vheqmsft_2-1737338136204.png

 

 

Final output

vheqmsft_0-1737338060648.png

vheqmsft_3-1737338152650.png

 

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

 

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

vheqmsft_1-1737338089811.png

vheqmsft_2-1737338136204.png

 

 

Final output

vheqmsft_0-1737338060648.png

vheqmsft_3-1737338152650.png

 

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

 

 

Greg_Deckler
Community Champion
Community Champion

@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.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors