Forum Discussion
Anonymous
3 years agoNot applicable
Previous Year Calculation -1 day
Hi! So I'm trying to "move" alla previous year metrics one day. For example; 2022-11-18 should be compared to 2021-11-19. I have solved it on a line by line basis but the sum of days doesn't wor...
- 3 years ago
Ok, try this then:
PY = SUMX ( VALUES ( Table[Date] ), CALCULATE ( [Sales], FILTER ( ALL ( 'Date'[Date] ), 'Date'[Date] = MAX ( OrderData[OrderDate] ) - 364 ) ) )
PaulDBrown
Community Champion
3 years agoOk, try this then:
PY =
SUMX (
VALUES ( Table[Date] ),
CALCULATE (
[Sales],
FILTER (
ALL ( 'Date'[Date] ),
'Date'[Date]
= MAX ( OrderData[OrderDate] ) - 364
)
)
)
Anonymous
3 years agoNot applicable
PaulDBrown Thank you!