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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Potdar
Regular Visitor

How to specify colors to denote the location using background color of a matrix cells in power bi

Hello,

 

I need help to color code matrix in power BI.

 

I have a matrix, appointment time is the row and appointment date and day in column. And cell values are container names for example. This view looks like an outlook calendar.

 

I want to set color as per destination based for every cell(container number) background.

 

I need different colors for different destination port( like for orlando "green", trento "orange" , etc)

 

So suppose container 1A has got destination port olando for date 26th of Jan 8AM.

In this matrix visual case - 8am is on left row header , 26th Jan is on the top column header and container 1A is the cell value.  I want green background color to show for container 1A cell. So just by seeing at the cell I know that continer 1A is reaching Orlando.

 

Please share any links or tips to solve this matrix color code situation.

 

Thanks in advance!!

1 REPLY 1
amitchandak
Super User
Super User

@Potdar , You can create a color measure based on measure or categorical values and use that in coditional formatting using field value option

 

examples

 

Color Date = if(FIRSTNONBLANK('Date'[Date],TODAY()) < date(2022,04,10) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .75 , "Amber" ,
"Red "
) ,
Switch(true(),
[SLA] = 1 , "Green" ,
[SLA] >= .5 , "Amber" ,
"Red "
)
)

Color = Switch( True() ,
Max(Table[Status]) < 200 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Max(Table[Status]) < 500 ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
) ,
Switch(true(),
[ERB] = .25 , "Orange" ,
"Red "
)
)

 

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
Top Kudoed Authors