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...
Greg_Deckler
7 years agoCommunity Champion
Anonymous - Sure, you could do something like this:
NetWorkDays = VAR Calendar1 = CALENDAR(TODAY(),[Any Given Date]) VAR Calendar2 = ADDCOLUMNS(Calendar1,"WeekDay",WEEKDAY([Date],2)) RETURN COUNTX(FILTER(Calendar2,[WeekDay]<6),[Date])
If necessary, reverse the parameters for the CALENDAR function.
Anonymous
6 years agoNot applicable
Sorry to re-open an old thread, but I'm not getting the right answer for the number of days using the COUNTX function in the NetWorkDaysHoursMinutes measure. If I have a start date of 10/11/2019 and an end date of 10/12/2019, depending on the start and end times, it could be 0 hours or 1 hour. E.g.
10/11/2019 11:00 to 10/12/2019 9:00 should return "0 Days 22 hours 0 minutes", but it returns "1 Day 22 hours 0 minutes"
Is there a way to fix this?