cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EashwarBalaji
Helper II
Helper II

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
Resolver V
Resolver V

Hi @EashwarBalaji ,

 

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
Resolver V
Resolver V

Hi @EashwarBalaji ,

 

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,

 

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

 

Thank you @Alf94 

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

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors