7 Replies Latest reply: Aug 14, 2015 1:48 AM by Pia Rieppo RSS

    How to best identify items based on "last date"?

    Pia Rieppo

      I'm stuck....  My transactions data has customers and purchase date.  I’m trying to create a new data field that would assign each customer into a group based on the latest purchase date.  For example, customers that last bought this year should be flagged as “new” while companies that bought in prior years should be flagged as old.

       

      Is this something best done at data load or by creating a new dimension? Either way, how would one accomplish this.  The existing variables are "purchase year" and "customer name".  I guess I'm basically asking how to find the max value of the field "Purchase Year" and create a new variable that assigns this max value to each company.

           

      Data FormatDesired new data field "type of client"

      Company

      Purchase Year

      Company

      Type of Client

      Acme2015Acmenew client
      Acme2012XYZold client
      Acme2012
      XYZ2011
      XYZ2011
      XYZ2010

       

      Thanks in advance for your help!!!