Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.
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.
Any help would be greatly appreciated.
Solved! Go to Solution.
@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]
)
)
Proud to be a 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]
)
)
Proud to be a Super User! |
|
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.