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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Coditional formatting matrix values based on text field

Hi,

 

I have a matrix with categories on rows (blacked out) week num (1..52) and day (mon to sun) on columns and some dates as values when a submission was made..

EashwarBalaji_0-1685108408030.png

 

I want to give background color to these values based on the day they are submitted on... 
Thursday and Sunday: Green
Rest of the days: Red

How to do this?
Thanks in advance.

1 ACCEPTED SOLUTION
Alf94
Solution Supplier
Solution Supplier

Hi @Anonymous ,

 

First change the default background of your lines to red. Then add a conditionnal formatting to your dates used as values.

 

Alf94_0-1685109349249.png

 

You have to use the day field ("JourNom" in my report) in your conditionnal formatting.

 

Alf94_1-1685109495113.png

 

Finally:

 

Alf94_2-1685109546883.png

 

If I answered to your question, please mark my post as a solution.

 

Best,

 

View solution in original post

4 REPLIES 4
Alf94
Solution Supplier
Solution Supplier

Hi @Anonymous ,

 

First change the default background of your lines to red. Then add a conditionnal formatting to your dates used as values.

 

Alf94_0-1685109349249.png

 

You have to use the day field ("JourNom" in my report) in your conditionnal formatting.

 

Alf94_1-1685109495113.png

 

Finally:

 

Alf94_2-1685109546883.png

 

If I answered to your question, please mark my post as a solution.

 

Best,

 

Anonymous
Not applicable

I'm not able to enter a text value for the condition.. its only accepting a numeric value

EashwarBalaji_0-1685110355420.png

 

This option has been available since (I think) the beginning of 2023. If your version of PBI Desktop is older, you can either update your application, or try using a field like "DayNumber" (1 for Monday, 2 for Tuesday, ..., 7 for Sunday). Then create a rule that says "green background when the minimum of my day number equals 4" (for Thursday) and the same for 7 (for Sunday).

 

Alf94_0-1685111254016.png

 

Anonymous
Not applicable

Thank you @Alf94 

I updated the desktop app and it works now. Thanks again!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors