Forum Discussion
SAMEPERIODLASTYEAR expects a contiguous selection
Hi StephenK ,
In addition to amitchandak's reply, you should make it only one-directional 1- Many from date to Data table. Because bi-directional join as that may cause date in date dimension also getting filtered. if you are trying to use these time intelligence functions like SAMEPERIODLASTYEAR or DATEADD, It needs a contiguous interval in date column.
If there is a filter to remove rows from the middle. Same period last year wants to look at just exactly 1 "period" -- that can be a week, day, month, 4.6 weeks... but they need to be 1 continuous range not like "the 1st and 4th week of July" (which would have a gap... in the 2nd and 3rd weeks, and is not allowed).
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai