title: sameperiodlastyear only works with contiguous date selection
body: <p>I have a data warehouse.  DimDate is connected to FactCost by datekey.  The relationship is many to one and the cross filter direction is single.</p>
  
  <p>I have defined YTD Cost measure: </p>
  
  <pre><code>YTD Cost = TOTALYTD(sum(Cost[Amount]),'Date'[DateKey])
  </code></pre>
  
  <p>and then YTD last year</p>
  
  <pre><code>LY YTD = CALCULATE([YTD Cost], SAMEPERIODLASTYEAR(Cost[DateKey]))
  </code></pre>
  
  <p>When I try to plot YTD last year I get the following error message:</p>
  
  <blockquote>
    <p>MdxScript(Model) (1,53) Calculation error in measure 'Cost'[LY YTD]:
    Function 'SAMEPERIODLASTYEAR' only works with contiguous date
    selection.</p>
  </blockquote>