title: DAX formula for previous month's values
body: <p>I'm new to DAX. In order to get the previous month's sales, I have used DATESBETWEEN and passed MAX(Date)-1 as the start date and as the end date EOMONTH.</p>
  <p>I got the correct results. However, what are the other simpler ways of getting the same?</p>
  <pre><code>CALCULATE (
  SUM ( AW_Sales[Sales Amount] ),
  DATESBETWEEN (
      AW_Calender_Lookup[Date],
      DATE ( YEAR ( MAX ( AW_Calender_Lookup[Date] ) ), MONTH ( MAX ( AW_Calender_Lookup[Date] ) ) - 1, 01 ),
      EOMONTH (
          DATE ( YEAR ( MAX ( AW_Calender_Lookup[Date] ) ), MONTH ( MAX ( AW_Calender_Lookup[Date] ) ) - 1, 01 ),
          0
      )
  )
  </code></pre>
  <p>)</p>
  <p>update - based on an answer given I added a new measure, but the value is empty. <a href="https://i.stack.imgur.com/v2j9C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v2j9C.png" alt="As you can see Number 1 from the bottom detailed matrix is placed on the summary matrix at the top, so as number 2, but number 3 (done using previous month) doesn't produce a total and empty in summary matrix   " /></a></p>