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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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