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...
Anonymous
4 years agoNot applicable
Hi Greg_Deckler , opening this thread. I have this same scenario, however, I need to exclude weekends. May I ask for your inputs/help on this? Thank you.
Greg_Deckler
4 years agoCommunity Champion
Anonymous Well, let's see, maybe something like:
Column =
VAR __Date = [Query date received]
VAR __IncludeWeekends = [Requirement] //assumes true/false
VAR __Days = [Days to add] // assumes a numeric value
VAR __Calendar = ADDCOLUMNS(CALENDAR(__Date, __Date + __Days * 2),"Weekday",WEEKDAY([Date],2))
VAR __CalendarX =
ADDCOLUMNS(
FILTER(__Calender,[Weekday] < 6),
"Days", VAR __MyDate = [Date] RETURN COUNTROWS(FILTER(__Calendar,[Date] <= __MyDate)
)
RETURN
IF(__IncludeWeekends, __Date + __Days, MAXX(FILTER(__CalendarX,[Days] = __Days),[Date]))
- Anonymous4 years agoNot applicable
Can I add switch function to filter per country? I have 9 countries, and all of them have different # of days to add.