title: Calculate Difference between months
body: <p>Dears,</p>
  
  <p>I have a fact table with Sales Values and Date dimension. Fact table contains cumulative values, for example: January: 1100, February: 1100+1000, March: 1100+1000+1200 etc.</p>
  
  <p>I want to add measure which returns values for seperate months. For example: in Jan 1100, in Feb 1000, in March 1200. I was trying to use this code:</p>
  
  <pre><code>SUM('SALES'[SALES VALUE])-CALCULATE(SUM('SALES'[SALES VALUE]),PREVIOUSMONTH('DATE'[DATE])
  </code></pre>
  
  <p>but it still returns invalid value. </p>
  
  <p>Below you find Excel with result in column D which I want to receive.</p>
  
  <p><a href="https://i.stack.imgur.com/JhkF6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JhkF6.png" alt="enter image description here"></a> </p>