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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Inconsistent holiday

Background: 

The company took the following holidays for 2018 - 

  • New Year’s Day (Jan 1)
  • Presidents’ Day (Feb 19)
  • Memorial Day (May 28)
  • Independence Day (July 4)
  • Labor Day (Sept 3)
  • Thanksgiving Day & day after (Nov 22 & 23)
  • Christmas Eve & Christmas Day (Dec 24 & 25)
  • New Year’s Eve (Dec 31)

However, in previous years, the Presidents' Day was NOT a holiday and MLK Day WAS a holiday.

 

I have a date table which contains all dates and corresponding holiday names with dates.I also have all the weekdays with 0=Sunday, 1=Monday, etc.  I would like to create a new column that is True False for working day vs. nonworking day. How do I create a column that reflects all years? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Create a new table called holiday to store the holiday information such as below.

2018-04-26_9-35-00.png

Create relationship between the holiday table with your original calendar table.

 

 

2018-04-26_9-38-07.png

 

Then use the following Dax to create a calcuated column to mark the working days

 

 

Isworkingday = IF('Calendar'[Weekday]>0&&'Calendar'[Weekday]<6&&COUNTX(RELATEDTABLE(Holiday),1)<1,"Yes","No")

2018-04-26_9-40-48.png

 

 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Create a new table called holiday to store the holiday information such as below.

2018-04-26_9-35-00.png

Create relationship between the holiday table with your original calendar table.

 

 

2018-04-26_9-38-07.png

 

Then use the following Dax to create a calcuated column to mark the working days

 

 

Isworkingday = IF('Calendar'[Weekday]>0&&'Calendar'[Weekday]<6&&COUNTX(RELATEDTABLE(Holiday),1)<1,"Yes","No")

2018-04-26_9-40-48.png

 

 

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.