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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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 Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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