title: Contiguous Date Selections SAMEPERIODLASTYEAR
body: <p>I am stuck on a very - I think - simple issue that is somehow now working for me anymore. I have created a measure to count the amount of retails made over the past years (starting in 2014):</p>
  
  <pre><code>Retails := CALCULATE(COUNT(fData[ProductionNumber);fData[OrderStatus]=50))
  </code></pre>
  
  <p>Next to this our data model consists out of a calendar table ranging from the first of January 2014 up to the 31st of December 2018. </p>
  
  <p>To make a year over year comparison I have defined the 'Previous Year retails' as:</p>
  
  <pre><code>PY Retails := CALCULATE([Retails];SAMEPERIODLASTYEAR('Date'[DateKey])
  </code></pre>
  
  <p>Somehow this lands me at the 'contiguous date selections'-error and I am unable to see why or how! Using this method to calculate the PY sales has always worked. Somehow in this case it doesn't. I have checked in my fact table and every date is contained in the calendar datekey. I was thinking that this maybe has to do with the fact that there was one retail on the 29th of February 2016 and then when shifting back it doesn't find that same date in 2015?</p>
  
  <p>Thank you for your help!</p>