Forum Discussion
SAMEPERIODLASTYEAR not working as expected
- 9 years ago
My guess on this is that you are filtering Fiscal Date[Date] through your slicers and so when you feed it to SAMEPERIODLASTYEAR in a measure, it is filtered to a single month/year and thus all of last year's information is not there. I would try wrapping an ALL around 'Fiscal Date'[Date]) to remove any slicer filter context.
that definitely seems to be what the issue is, now if i could just get it to plot correctly on my line graph!
thanks
From what I have observed if you do the following it does work:
1. The DATE table should have unique rows which contain ALL the dates from your dataset. So if your FACTS table cotains daily transactions from 2010 to 2017 with a few missing days the DATE table should contain those missing days as well.
2. Connect your DATE table with the FACTS table with the DATE key(ex: 01/03/2017) and not a DATID key