title: DAX Select a date range in the calendar table
body: <p>I am looking to select the size of the calendar table, filtering everything before or after some date, much like a slicer does. </p>
  
  <p>I am trying to compute the percentage change between prices of equity indexes between two dates: now and a  year ago. The problem is that the same date last year   sometimes falls on a non-trading day. In that case I want the code to select the earliest value available.</p>
  
  <p>In a similar situation, where I use a slicer, I implemented this by using <code>FIRSTNONBLANK</code> and <code>LASTNONBLANK</code> functions. This way, if the slicer is set to a non-trading date the system still works. </p>
  
  <p>I am very much a DAX/Power BI novice, interested in the methodology in DAX as much as addressing the current problem.</p>
  
  <p>Thanks in advance.</p>