title: DAX How to express today "one month ago"
body: <p>I want to create a card with last month's sales using Power BI Desktop.</p>
  
  <p>For that, I need a measure that is capable of expressing today "one month ago"</p>
  
  <p>For example, this month's sales is:</p>
  
  <pre><code>This month sales =
  VAR ThisMonth =
      MONTH ( TODAY () )
  RETURN
      CALCULATE (
          'orders'[SalesAmount];
          'calendar'[month_number] = ThisMonth;
          'calendar'[year] = 2017
      )
  </code></pre>
  
  <p>All time intelligence functions seem to be good to handle columns of date but not scalar values like this case is. </p>
  
  <p>Also, because I'm using a card, there's no "filter context", therefore, I need a volatile function like <code>TODAY</code>.</p>
  
  <p>Thanks!</p>