4 Replies Latest reply: Dec 18, 2015 2:51 PM by David Capan RSS

    Comparing sum of previous record

    David Capan

      Hello,

       

      I'm trying to compare the sum of a value to that same sum of a value, but for the previous record (Month in this case).

      I can't quite seem to get it to work properly.

       

       

      Month Jul-15Aug-15
      Salesman Sales% IP%   RF% OT%Sales% IP%   RF% OT%
      Salesman172.73%18.18%4.04%88.89%78.45%28.45%0.86%85.34%
      Salesman266.67%33.33%0.00%66.67%75.00%25.00%0.00%100.00%

       

      What I'm trying to get is a column, or a separate table, that will contain a flag displaying 1 or 0, if the salesmans' percentages went up, for each expression column.

       

      Month Jul-15Aug-15
      Salesman Sales flag IP%   RF% OT%
      Sales%
      IP%
        RF% OT%
      Salesman101011100
      Salesman211001001

       

      The earliest month shown, July in this case, would compare June data, or the previous month's data, with that month.

       

      I've tried to use set analysis with aggregate functions with no luck so far.

       

      Any ideas?