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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EashwarBalaji
Resolver I
Resolver I

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
Super User
Super User

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
Super User
Super User

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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