4 Replies Latest reply: Apr 23, 2012 5:31 AM by Abhinav Agarwal RSS

    Cumulative sum in pivot table

    Abhinav Agarwal



      I am having some problem calculating a cumulative sum in a pivot table.


      I have a dynamic number of months m1, m2, m3 .... on top as column headers and a number of products in the first column.

      I need to have a cumulative sum of sales by month number by product.


      As the number of months m1, m2, m3 is dynamic based on the period selected i was thinking of using ColumnNo() to get the last column and do a sum using Rangesum from Column(1) to Column() using the before() function.


      I somehow cant get it to work.


      Any suggestions onthe syntax or other methods for doing thr same.


      Looking forward to a solution!


      Thanks in advance