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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
RT3308
Helper I
Helper I

Matrix - Date Columns > Conditional Formatting Background when isWeekend

Hello... can someone please help me?  I know this is pretty simple but I can't seem to figure this out.

I've got a DateDimension that I'm using as my columns.. and I've got a measure that I use on the value of the Matrix.  I'd like to change the background of the entire columns when the date is a weekend (regardless of what value of the measure is).  I'd like the background of the column for all rows on those "weekend" columns (which is already defined as one of the attribute field of DateDim).  Please help.  Thanks.

 

RT3308_0-1682406823779.png

 

5 REPLIES 5
v-jingzhang
Community Support
Community Support

Hi @RT3308 

 

If you have a column similar to below "IsWeekend" column in Dimdate table, which has 1 for weekend dates and 0 for working dates,  

vjingzhang_0-1682995516672.png

you can set up the background conditional formatting based on "Sum of IsWeekend". Just like below. 

vjingzhang_1-1682995667517.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Thanks so much for your reply @v-jingzhang for that reply 🙂 ... yes I wish it's that easy.  My problem is that my matrix values may or may not have values.  For example, if my rows are EmployeeNames... then the columns are the dates and some employees don't work on weekends but some do -- this becomes an issue.  How do I highlight the background to a color regardless if there's a value in the matrix -- based on column's (DimDate) attribute isWeekend? 

Hi @RT3308 

 

I guess you have a fact table which has employees and their working dates, and this table is connected to the Dim Date table right? Do you have a Dim Employee table? If not, my idea is that you can add a Dim Employee table which has all distinct employees, and connect this table to the fact table on Employee column. Then use this Dim Employee table's Employee column on rows of the matrix visual instead. See if this will help. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

RT3308
Helper I
Helper I

Hello... is there anyone able to help me on this please?  It's quite surprising that there's no easy way to do this -- background color the matrix columns regardless of the measure... but based on the dimension on columns > DimDate.isNotWorkingDay=true.  Basically I want to see the matrix (columns is the calendar) and highlights all columns that are weenends/holidays... just like in excel.  Please help.  Thanks.

RT3308
Helper I
Helper I

I tried doing Background Color > Rules > based on Count of isWeekendHoliday > if value is blank then color GREY...

 

This works for the most part since there's no data mostly on employees because they don't work during these days.  But when it comes to few employees that do work on those days, the color background becomes like a puzzle.  Please help, I just need to pretty much background highlight all columns that are non-working days (weekends and holidays).

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.