Greg_Deckler
8 years agoCommunity Champion
Net Work Days
Recreates the NETWORKDAYS function from Excel with some bonus measures and one that needs fixed or demonstrates a bug/documentation glitch.
NetWorkDays calculates the number of days between two...
deshbali
3 years agoRegular Visitor
I don't know what I am doing wrong, for sept it return 2 days :
NetWorkDaysnew =
VAR __Date1 = dt"2022-09-05"
VAR __Date2 = dt"2022-09-06"
VAR __Date1a = MINX( { __Date1, __Date2 },[Value])
VAR __Date2a = MAXX( { __Date1, __Date2 },[Value])
VAR __Calendar =
ADDCOLUMNS(
CALENDAR(__Date1a, __Date2a),
"__WeekDay",
WEEKDAY([Date],2)
)
RETURN
COUNTX(
FILTER(
__Calendar,
[__WeekDay] < 6
),
[Date]
)
Same pattern for all odd months Jan, Mar, May and for some months like feb and Nov it returns null