Forum Discussion
Albatross810
3 years agoRegular Visitor
NETWORKDAYS dynamically filtering by dates and person
I want to calculate the working days between dates with varying holidays within a specified period. For example, I have a table that lists personal holidays: Person Holidays Jane 02-Feb-2...
- 3 years ago
Albatross810 So like this?
Measure = VAR __Person = MAX('Jobs'[Person]) VAR __Result = NETWORKDAYS(MAX([Start]), MAX([End]), 1, SELECTCOLUMNS(FILTER('Holidays', [Person] = __Person),"__Holidays",[Holidays])) RETURN __Result
Greg_Deckler
3 years agoCommunity Champion
- Albatross8103 years agoRegular Visitor
Been working with NETWORKDAYS all day, can't seem to solve this one. It doesn't sum multiple periods if I'm selecting several for example and won't let me use the holiday table dynamically by owner. But thank you for sharing.
- Greg_Deckler3 years agoCommunity Champion
Albatross810 So like this?
Measure = VAR __Person = MAX('Jobs'[Person]) VAR __Result = NETWORKDAYS(MAX([Start]), MAX([End]), 1, SELECTCOLUMNS(FILTER('Holidays', [Person] = __Person),"__Holidays",[Holidays])) RETURN __Result- Albatross8103 years agoRegular Visitor
Thanks so much, this worked well!