Forum Discussion
eburg
5 years agoFrequent Visitor
Comparing Against Prior Fiscal Period
Hello, I'm trying to calculate something rather simple. I want to compare my current Fiscal Period sales versus previous same Fiscal Period last year. So like Period 1 2021 versus Period 1 2020....
pfarahani
5 years agoHelper II
Try something like this:
For mine, I Added an additional date column to my table which subtracts the current date by one year:
PY Date = DATE(YEAR(Dates[Date])-1,MONTH(Dates[Date]),DAY(Dates[Date]))
Then used the following DAX to return the sales amount from the previous year:
Then used the following DAX to return the sales amount from the previous year:
Total Value Previous Year =
CALCULATE (
[Total Sales],
FILTER (
ALL ( Dates ),
Dates[Year] = MAX ( Dates[Year])-1
&& Dates[Date] <= MAX ( Dates[PY Date] )
))