title: Calculate the average for the last 30 days excluding today. DAX
body: <p>I would like to calculate the average revenue for the last 30 days (not including today)
  I tried the following formula but the amount calculated is incorrect:</p>
  
  <pre><code>CALCULATE(
             AVERAGE(table[Revenue]),
             FILTER(table,DATEADD(table[date],-30,DAY))
      )
  </code></pre>
  
  <p>How can I exclude today in the average?
  If i wanted to compare that result with the 30 days before that (i.e between -30 days and -60days) should i use datesinperiod?</p>