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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
SteffanieJ
Frequent Visitor

Calculate NON-Work Days between two dates

Hello!  I am trying to calculate the number of NON-Work Days between two dates but all I can find is how to get working days.  

 

This is my Excel formula.

SteffanieJ_0-1719252962941.png

I do have a calendar set up with these columns but I don't know how to filter for the 0's in "If Work Day" column.

SteffanieJ_1-1719253178406.png

Any help would be greatly appreciated.

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@SteffanieJ , Add a calculated column to add weekends 

 

IsWeekend =
IF (
WEEKDAY(DateTable[Date], 2) >= 6,
TRUE,
FALSE
)

 

And one more to identify holiday 

IsHoliday =
IF (
CALCULATE (
COUNTROWS ( Holidays ),
Holidays[HolidayDate] = DateTable[Date]
) > 0,
TRUE,
FALSE
)

 

And after that Combine weekends and holidays to create a column identifying all non-work day

IsNonWorkDay =
DateTable[IsWeekend] || DateTable[IsHoliday]

 

Finally, create a measure or a calculated column to calculate the number of non-work days between two dates. Assuming you have a start date and end date in your data model, you can create a measure like this:

NonWorkDaysBetween =
CALCULATE (
COUNTROWS ( DateTable ),
FILTER (
DateTable,
DateTable[Date] >= MIN ( YourTable[StartDate] ) &&
DateTable[Date] <= MAX ( YourTable[EndDate] ) &&
DateTable[IsNonWorkDay]
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

1 REPLY 1
bhanu_gautam
Super User
Super User

@SteffanieJ , Add a calculated column to add weekends 

 

IsWeekend =
IF (
WEEKDAY(DateTable[Date], 2) >= 6,
TRUE,
FALSE
)

 

And one more to identify holiday 

IsHoliday =
IF (
CALCULATE (
COUNTROWS ( Holidays ),
Holidays[HolidayDate] = DateTable[Date]
) > 0,
TRUE,
FALSE
)

 

And after that Combine weekends and holidays to create a column identifying all non-work day

IsNonWorkDay =
DateTable[IsWeekend] || DateTable[IsHoliday]

 

Finally, create a measure or a calculated column to calculate the number of non-work days between two dates. Assuming you have a start date and end date in your data model, you can create a measure like this:

NonWorkDaysBetween =
CALCULATE (
COUNTROWS ( DateTable ),
FILTER (
DateTable,
DateTable[Date] >= MIN ( YourTable[StartDate] ) &&
DateTable[Date] <= MAX ( YourTable[EndDate] ) &&
DateTable[IsNonWorkDay]
)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.