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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.