Forum Discussion
Date Duration exclude weekends
Here is a very simple model that shows same scenario as you have and you can see all calculations I have made to make it work. Please note that the function DatesBetween will return a table that includes both the starting date and the ending date! Thus you need to consider how you define the duration (with starting/ending date included or vice versa)
Create a column with 1 for weekdays and 0 for weekendscalculate number of days from starting date until ending date without weekends
Hi Anonymous ,
For which field (OpenDate or ClosedDate) i have to create a column with IsWeekday function
Here we have only two date fields OpenDate & CloseDate
- Anonymous8 years agoNot applicable
ssvr This proposed solution is based on the assumption that you have a separate date table. And it's for that date table you create the IsWeekday column, not for the OpenDate or the CloseDate in your fact table.
Br,
Magnus