Forum Discussion
apnorona
6 years agoNew Member
PREVIOUSDAY for workdays
Hi, I´m trying to calculate a variation of a measure only for workdays (Monday to Friday). Still, the PREVIOUSDAY formula takes all the days (Monday to Sunday), and I have the problem in the variati...
- 6 years ago
Try this:
PreviousWorkday = IF ( WEEKDAY ( MAX ( Table[Date] ), 2 ) = 7 ), MAX ( Table[Date] ) - 3, IF ( WEEKDAY ( MAX ( Table[Date] ), 2 ) = 6 ), MAX ( Table[Date] ) - 2, MAX ( Table[Date] ) - 1 ) )