6 Replies Latest reply on Feb 19, 2016 5:25 AM by Noah Spitzer

    Calculate Last value minus First value by date, and a case statement

    Noah Spitzer

      I'm trying to create a calculation that would vary by program. Any help would be appreciated as I've searched and beat my head against the wall all day. Thanks!

       

      For Program A, I need a SUM(QTY)

      For Program B, I need the Difference between the Last Value and the First Value

       

      Example Result:

      PROGRAMQTY
      A19
      B3

       

      Example Data:

      MONTHPROGRAMQTY
      1/1/2016A1
      1/1/2016B2
      2/1/2016A3
      2/1/2016B7
      3/1/2016A4
      3/1/2016B2
      4/1/2016A3
      4/1/2016B6
      5/1/2016A8
      5/1/2016B

      5