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
Transho
Frequent Visitor

Background color in matrix

Hi,

I am new to Power BI and seek help.

I have generated a transition matrix visualization with a connected bin field and several count columns as shown below.

I want to change the background color of the cells in the body of the visualization depending on position as it is in excel report.

Thanks

Transho_0-1668608094683.png

 

Transho_1-1668608123614.png

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Transho , You need kind of color measure

 

Switch(true(),

Max(Table[Bucket1]) = Max(Table[Bucket2]) , "Yellow"

Max(Table[Bucket1]) < Max(Table[Bucket2]), "Orange",

"Blue"

)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
Transho
Frequent Visitor

Thanks for the tip ... i did some research starting from the note about the switch function and created several color measures which are applied to each individual field ... and it worked.

amitchandak
Super User
Super User

@Transho , You need kind of color measure

 

Switch(true(),

Max(Table[Bucket1]) = Max(Table[Bucket2]) , "Yellow"

Max(Table[Bucket1]) < Max(Table[Bucket2]), "Orange",

"Blue"

)

 

How to do conditional formatting by measure and apply it on pie?
https://www.youtube.com/watch?v=RqBb5eBf_I4&list=PLPaNVDMhUXGYo50Ajmr4SgSV9HIQLxc8L
https://community.powerbi.com/t5/Community-Blog/Power-BI-Conditional-formatting-the-Pie-Visual/ba-p/...
https://amitchandak.medium.com/power-bi-where-is-the-conditional-formatting-option-in-new-format-pan...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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