title: Referencing the previous row in Spotfire and a value in another column
body: <p>I'm trying to do something that is very simple to do in Excel, but seems very tricky in Spotfire:</p>
  
  <p>Imagine you have the following table:</p>
  
  <pre><code>    A
  1: 10  
  2: 15  
  3: 20
  </code></pre>
  
  <p>... and you want to produce the following:</p>
  
  <pre><code>    A   B  
  1: 10  10  
  2: 15  25
  3: 20  45
  </code></pre>
  
  <p>In other words, add the current value of A to the previous value of B. If this was Excel, the formula in cell B3 would be <code>= A3 + B2</code>... However, I'm not in Excel, I'm using Spotfire... :) Any thoughts? </p>
  
  <p>NB: If it makes any difference to the answer at all, I will need to use the <code>Intersect()</code> function in conjunction with this, as there is a categorical column to factor in as well. </p>