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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Conditionally formatting multiple fields in a matrix

@ links to members, content
 
I am trying to coditionall format a matrix with four colors.  Issue, when I get into conditionally formatting background color and I use diverge, I can only set up 3 colors.  I need to color code 4 colors.  See sample table below.  The work hours should be colo
 
EmpoyeeWork DateCategoryWork HoursColor Code
Jane Dow1/1/2019Labor Salary8

Green

Jane Doe1/5/2019Vacation10Orange
John Dow2/2/2019Holiday12Black
Jane Dow2/15/2019Labor Daily8Green
Jane Doq1/31/2019Labor Hourly10Green
John Doe1/31/2019Missing Time0Pink

 

1 ACCEPTED SOLUTION

@Anonymous , created this file you. Hope this works for you

https://www.dropbox.com/s/5xubpa67hdaquxg/ColorMeasure.pbix?dl=0

 

Appreciate your Kudos.

 

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

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous 

In diverge, you can three colors, but you can four colors based on condition. Refer

https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting

 

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
Anonymous
Not applicable

@amitchandak  I have read this document several times.  The options in this document does not work as I will need to change the background colors for work hours based on the category field.  This does not solve my issue.  Thanks

 

@Anonymous , created this file you. Hope this works for you

https://www.dropbox.com/s/5xubpa67hdaquxg/ColorMeasure.pbix?dl=0

 

Appreciate your Kudos.

 

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
Anonymous
Not applicable

@amitchandak Thank you so much!  This is what I was looking for, I did not know how to write the DAX formula!  You rock!!

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.