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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors