3 Replies Latest reply: Sep 16, 2013 3:38 AM by Gysbert Wassenaar RSS

    YTD Value (Set Analysis)

    Steve Zagzebski

      I am trying to get a YTD Commission. My data is below.

       

      CustIDCustMonthDateDateNumDateYearProdCommissionCommission-YTD
      V|WALLF-1|B202AFeb2/1/2012409402012B2028142.24
      V|MADAR-1|B202BFeb2/1/2012409402012B2021425.19
      V|WISAL-1|B202CFeb2/1/2012409402012B2021923.95
      V|NATIG-1|B202DFeb2/1/2012409402012B2024186.72
      V|KICKV-2|B202EFeb2/1/2012409402012B2023917.07
      V|PRODL-1|B202FFeb2/1/2012409402012B202918.97
      V|GARDM-1|B202GFeb2/1/2012409402012B2021799.34

       

      What I want (in the Commission-YTD column) is sum of all months up to the month month selected for that year. (If user selects Feb and 2012, then Commission-YTD column is a total of Jan 2012 and Feb 2012 for that particular row.

       

      My current expression is bringing back 0's:

        Sum ({<[DateNum] = {$(=<Max([DateNum]))}>}Commission)