SamePeriodLastYear returns this year selecte period value

Try using DATEADD instead of SAMEPERIODLASTYEAR. Here is one of Sam’s videos that explains this concept.

Enterprise%20DNA%20Expert%20-%20Small