I have a Power Pivot file with sales data, and I follow last week's sales to the previous year's sales. I have a function called "Previous year's sales" which is defined as
=CALCULATE([Total Sales];SAMEPERIODLASTYEAR('Calendar'[Date]))
This has worked fine, but now when I added 2022 to the calendar and try to change the year to 2022 in the report I get the error "only works with contiguous date selections". The Calendar is defined as a calendar table and I added 2022 using the define dates wizard. Everything works fine if I switch between 2020 and 2021 but 2022 gets that error.
Any idea what this could be due to?
=CALCULATE([Total Sales];SAMEPERIODLASTYEAR('Calendar'[Date]))
This has worked fine, but now when I added 2022 to the calendar and try to change the year to 2022 in the report I get the error "only works with contiguous date selections". The Calendar is defined as a calendar table and I added 2022 using the define dates wizard. Everything works fine if I switch between 2020 and 2021 but 2022 gets that error.
Any idea what this could be due to?