Forum Discussion
equivalent function of Networkdays in DAX
- 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
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
- Shankar9 years agoRegular Visitor
Thanks a lot Sir. It works :manhappy: .
Was looking for it badly.
Thanks,
Shankar A
- Anonymous6 years agoNot applicable
I write Same Dax Function but it is showing The start date or end date in Calendar function can not be Blank value.
is ther any function to remove that error. - Anonymous4 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?