3 Replies Latest reply: Oct 16, 2014 10:48 PM by Daniel Oberbillig RSS

    Getting previous quarters

      Hi All,

       

      Just want to ask how I can achieve getting the sum of previous quarters. Let's say I have the ff. data.

       

      YearQtr-YearSourceQty
      2013201303B21312
      2013201304A21312
      2014201401A32
      2014201401A43
      2014201401A24
      2014201401B55
      2014201401B6556
      2014201402B21
      2014201402A312
      2014201402A445
      2014201402B5
      2014201402B7568
      2014201403A79
      2014201403A7878
      2014201403B23432
      2014201403A324
      2014201403B32
      2014201403B42
      2014201404A23432
      2014201404A423

       

      I need to get all the sum of qty where source = A. I need to output in a table the sum({<source A>}qty) - previous sum({<source A>}Qty) / previous sum({<source A>}Qty) .

       

      As much as possible I want to implement this in the script as I do not want to use column() in the table.

       

      Thanks,

      Lyn