title: SamePeriodLastYear by Day
body: <p>I am looking to calculate the sales for the <code>SAMEPERIODLASTYEAR</code>. I have a table which looks at the sales for the last few years and using the <code>SAMEPERIODLASTYEAR</code> function I can draw back to last January as a whole, but what I am wanting is to pull it to the date exactly and not to the end of the current month last year. </p>
  
  <p>My formula below is pulling through for example all of January last year.</p>
  
  <pre><code>Sales Last Year:=CALCULATE([Sum of Sales],SAMEPERIODLASTYEAR(Dates[Date]))
  </code></pre>
  
  <p>Is there a way of doing this using just the <code>SAMEPERIODLASTYEAR</code> function rather than indivudual daily calculations?</p>