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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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