title: SSRS 2008 R2 Subtracting current row from previous row where data is summed
body: <p>I am fairly new to SSRS 2008 R2. Trying to convert my reports from Crystal. Thought this would be a simple task but this ended up being a pain. I have a table that is grouped by Year then Week_Number so the table looks this when run: (I am trying to create the total row)</p>
  
  <pre><code>     Week1   Week2   Week3   Week4
  2013   1       2       5       4
  2014   0       3       2       6
  Total -1       1      -3       2
  </code></pre>
  
  <p>There is a row group called <code>Year</code> and column group called <code>Week_Number</code>. I have one expression in the total column <code>Sum(Fields!TotalProdWTD.Value)</code>.  </p>
  
  <p>I added a group footer to try create the total row. I am able to sum the column works fine, I can get the value of the last row by doing this <code>ReportItems!txtTotalProd.Value</code>. But when I try to use </p>
  
  <pre><code>=Previous(ReportItems!txtTotalProd.Value) 
  </code></pre>
  
  <p>I get the aggregate functions can be used only on report items contained in page headers and footers message. I believe I have to add a reference to the group to make the previous function work, just not sure how to do that.</p>