5 Replies Latest reply: Sep 12, 2013 5:52 AM by Jason Michaelides RSS

    Choosing Max Month and YTD

    Steve Zagzebski

      My Data:

      Customer NameMonthYearCummPerc CubeCommission
      A0120120.751000
      A0220120.802000
      A0320120.853000
      B0120120.80250
      B0220120.85500
      B0320120.90750
      A0120130.652000
      A0220130.754000
      A0320130.956000
      B0120130.801000
      B0220130.852000
      B0320130.903000

       

       

      I need an expression where the user selects a Year and a Month and a percent (based on a Variable) and it returns the sum of all commission for that year and all months <= Month selected,  IF the total commission IF "CummPerc Cube" is <= the variable selected.

       

      So for example if the user selects Year: 2012, Month: 02 and the Variable of .82 the the returned object would be:

       

      Customer NameCummPerc CubeCommission
      A0.803000

       

       

       

      because Customer A is the only one that had "CummPerc Cube" value of under .82 in the month/year that was selected.