2 Replies Latest reply: Mar 17, 2016 10:56 PM by Samuel Wong RSS

    Compare previous column

    Samuel Wong

      Hi,

       

      Need help on how i can achieve this in Qlikview. VCHSEQ is the column that will only populate 1 or 2 base on the condition of the previous row. I have tried to use peek and for loop but no success so far. Please refer to the attachment for more details. Any help is appreciated!

        

      RRNXVCH7VCHSEQThis Row RRN minus Previous Row RRN
      66825410000010
      66825510000011
      66825610000011
      66825710000011
      66825810000011
      66825910000011
      66826010000011
      66826110000011
      66826210000011
      66826310000011
      66826410000011
      66826510000011
      66826610000011
      66826710000011
      11000011-668266
      210000111
      310000111
      6682681000012668265
      66826910000121
      66827010000121
      66827110000121
      66827210000221
      66827310000221
      66827410000221
      66827510000221
      41000031-668271
      510000311
      610000311
      6682761000032668270
      66827710000321
      66827810000321
      66827910000321
      66828010000321