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

    Comparing sum of previous record

    David Capan



      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%


      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%
        RF% OT%


      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?