4 Replies Latest reply on Aug 13, 2018 9:19 PM by Hari Ankem

    How to use LOOKUP on rows with varying key field data

    Trevor Hungerford

      Hi all,

       

      I am seeking some assistance with how to visualise the number of times a vessel changes it's berth position, e.g. vessel AAA below changed berth position 2 times after the original position of Z (Z > Y > Z)

       

      I have tried using the lookup function (LOOKUP(ATTR([BERTH]),-1)) but I run into the issue where the previous row may not be the same vessel (more than likely will not be).

       

      The data contains not just a new row per berth change, but for other data changes, such as a change to the arrival time.

       

      Below is a similar set of data as to my actual production data;

       

      VESSELDATEBERTHARRIVAL
      AAA1-JunZ10-Jun
      AAA3-JunY10-Jun
      BBB5-JunV11-Jun
      CCC6-JunW12-Jun
      BBB7-JunU11-Jun
      AAA7-JunZ10-Jun
      DDD8-JunY13-Jun
      AAA8-JunZ15-Jun
      DDD9-JunY18-Jun

       

      Any help would be appreciated.

       

      Regards,

      Trev.