Forum Discussion
Shankar
9 years agoRegular Visitor
equivalent function of Networkdays in DAX
Hi Team - I need to calculate the total number of business days between two dates. Attached the file and the results. Please help.
- Anonymous9 years ago
Hi Shankar,
You can try to use below calculate column formula to calculate the total normal workday.(except saturday sunday)
Total WorkDays = COUNTROWS ( FILTER ( ADDCOLUMNS ( CALENDAR ( [Start], [End] ), "Day of Week", WEEKDAY ( [Date], 1 ) ), [Day of Week] <> 1 && [Day of Week] <> 7 ) )If you need to remove other holidays, you need to create a holiday table and remove them in the formula.
Regards,
Xiaoxin Sheng
Anonymous
9 years agoNot applicable
Hi Shankar,
You can try to use below calculate column formula to calculate the total normal workday.(except saturday sunday)
Total WorkDays =
COUNTROWS (
FILTER (
ADDCOLUMNS ( CALENDAR ( [Start], [End] ), "Day of Week", WEEKDAY ( [Date], 1 ) ),
[Day of Week] <> 1
&& [Day of Week] <> 7
)
)
If you need to remove other holidays, you need to create a holiday table and remove them in the formula.
Regards,
Xiaoxin Sheng
Anonymous
4 years agoNot applicable
"If you need to remove other holidays, you need to create a holiday table and remove them in the formula."
Maybe you can show me?