7 Replies Latest reply: Feb 4, 2015 9:09 PM by Steve Zagzebski RSS

    Most recent year of data - Expression/Set analysis

    Steve Zagzebski


      I am tring to get the right expression to get the sales of a customer from their most recent year of sales. I tried using an AGGR expression with a FirstSortedValue expression but I must be way off cuz nothing returns:

      firstsortedvalue(aggr(sum(Sales),Customer), -Year) :

       

      Data:
      CustomerYearSales
      A201425
      A201450
      A201375
      B2012100
      B2011125
      B2011150
      C2013175
      C2013200
      C2010225
      C2009250
      DESIRED Results:
      Customer Latest YearTotal Sales
      A201475
      B2012100
      C2013375