Forum Discussion
Date Duration exclude weekends
Hi Chethan,
You should import the Dates Table in your data model for the implementation of my solution.
Step 1: As Part of the calculation, Create IsWorkDay Calculated Column in Your Dates Table
IsWorkDay=SWITCH(WEEKDAY([Date]),1,0,7,0,1)
Step 2: Create Days Duration excluding Weekends by creating another calculated column in your orders table
Days Duration excluding Weekends=CALCULATE(SUM(Dates[IsWorkDAY]),
DATESBETWEEN(Dates[Date],
OrdersTable[Opened Date/Time ],
OrdersTable[Closed Date /Time ] )
)
is there a way i can do a reversal on the same thing that you explained above - I have a date table and i am able to calculate working days.(0s for weekends and 1's for Weekdays). I need to add 5 days to my start date and and pick the appropriate working date from the date table so that it gives me an "Expected Completion Date" that takes account of weekends.