5 Replies Latest reply: Jun 2, 2016 5:43 PM by Ramon Covarrubias RSS

    Give each row a sequential number depending on several fields

    Viktoriya Shulian

      Hi everyone,

       

      I'm looking to number my rows, based on values of three fields.

      The data looks like the following: I have UserId, VisitId, and HitNumber. However, HitNumber isn't always sequential, and I'd like to have another field that does give each row a sequential number, but only within the confines of UserId and VisitId.

      I want to create the field PVNumber, that will give each UserId + VisitId + HitNumber combination a sequential number as shown below:

       

      UserIdVisitIdHitNumberPVNumber
      1234567987611
      1234567987632
      1234567987643
      1234567987664
      4567890765411
      4567890765452
      4567890765463

       

      How can I do this?

       

      Thanks in advance.