Forum Discussion
koorosh
3 years agoPost Partisan
Same Period Last Year
Hi, Why sameperiodlastyear did not result in one year back from the date column selected?
VilmarSch
3 years agoPost Partisan
Apparently it's normal:
The SAMEPERIODLASTYEAR is equivalent to DATEADD(dates, -1, year).
Its biggest year in the date table is 2019, so SAMEPERIODLASTYEAR will show the previous year, i.e. 2018.
Its smallest year in the date table is 2014, so SAMEPERIODLASTYEAR will not show the previous year, i.e. 2013.
- koorosh3 years agoPost Partisan
Why it is normal that does not show 2013? If you use DATEADD(dates, 1, year), and the biggest one is 2016 (attached file) the result shows 2017.