7 Replies Latest reply: Feb 20, 2015 5:10 AM by Joseph Simmons RSS

    Loop-alike (Take previous value if condition is met)

    Atsushi Saijo

      I have such data, and must make 'Reference' field in such manner:

       

      Add reference field:

      • If Type = 'A', take Value;
      • If Type <> 'A', take the nearest Value of earlier sequence;

      *table is ordered by Seq ASC.

       

      [Original Data]

      TypeSeqValue
      A11
      B221
      B322
      D423
      A55
      B639
      A77
      C854

       

      [Must add "Reference" field]

      TypeSeqValueRef
      A111
      B2211
      B3221
      B4231
      A555
      B6395
      A777
      B8547

       

      Would you possibly advise how we would achieve such load?