title: dax subtracting value from another column
body: <p>I need your help on this below scenarios, We have data in column Date ,A and B.</p>
  
  <p>I need the output like other column "Result"</p>
  
  <p>steps :</p>
  
  <p>A- B = Result</p>
  
  <p>then take value from Result - next row value of B</p>
  
  <p>until the result value get zero.</p>
  
  <p>once you get zero then need to divide the previous value of result and corresponding vale of B . which i am highlight as red color.</p>
  
  <p>this should be in measure. not by calculated column.</p>
  
  <p><a href="https://i.stack.imgur.com/HClB6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HClB6.png" alt="enter image description here"></a></p>