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
lennox25
Post Patron
Post Patron

Help with Calculated Column for IsWorkday to Exclude Bank Holidays

I have this column 'IsWorkDay' but it wont pick up the EnglandWales Holiday its counting all as 0?

 

IsWorkDay = IF(OR(DateTable'[WeekDayNo] = 1, DateTable[WeekDayNo]=7),0,IF(ISBLANK(Datetable[EnglandWalesHoliday]),1,0)) 
 
lennox25_0-1707385259552.png

 

Can anyone help to tell me what I've done wrong? Thank you

1 ACCEPTED SOLUTION
amustafa
Solution Sage
Solution Sage

Based on the sample data you've provided, it appears that the `EnglandWalesHoliday` column is using `1` to indicate a holiday and `0` for non-holidays. This differs from the initial assumption that the column would be blank for non-holidays.

Given this, you need to adjust your DAX formula to properly check for a `1` instead of using `ISBLANK`. Here's the revised DAX formula:


IsWorkDay = IF(
OR(DateTable[WeekDayNo] = 1, DateTable[WeekDayNo] = 7),
0,
IF(DateTable[EnglandWalesHoliday] = 1, 0, 1)
)

This formula will return `0` if the day is either a weekend (WeekDayNo = 1 or 7) or a holiday (EnglandWalesHoliday = 1), and `1` otherwise.

Please replace `DateTable` with the actual name of your table if it is different. After updating the formula in your environment, it should correctly reflect whether a day is a workday or not.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
amustafa
Solution Sage
Solution Sage

Based on the sample data you've provided, it appears that the `EnglandWalesHoliday` column is using `1` to indicate a holiday and `0` for non-holidays. This differs from the initial assumption that the column would be blank for non-holidays.

Given this, you need to adjust your DAX formula to properly check for a `1` instead of using `ISBLANK`. Here's the revised DAX formula:


IsWorkDay = IF(
OR(DateTable[WeekDayNo] = 1, DateTable[WeekDayNo] = 7),
0,
IF(DateTable[EnglandWalesHoliday] = 1, 0, 1)
)

This formula will return `0` if the day is either a weekend (WeekDayNo = 1 or 7) or a holiday (EnglandWalesHoliday = 1), and `1` otherwise.

Please replace `DateTable` with the actual name of your table if it is different. After updating the formula in your environment, it should correctly reflect whether a day is a workday or not.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Perfect - Thank you so much!

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.