8 Replies Latest reply: Aug 22, 2018 9:23 PM by Muhammad Hazim Muhammad Alif RSS

    How to rank based on date in load script?

    Muhammad Hazim Muhammad Alif

      Hello,

       

      For example, the raw data looks like this,

       

      LOAD * INLINE [

          F1,    F2     Date

          A,     100    1/8

          B,      90     1/8

          C,     150    2/8

          D,      67     2/8

          E,      69     1/8

          F,       99     3/8

          G,      12     3/8

          H,       9      2/8

      ];

       

      I want to produce something similar like below

       

      LOAD * INLINE [

          F1,    F2     Date     Rank

          A,     100    1/8          1

          B,      90     1/8          2

          C,     150    2/8          1

          D,      67     2/8          2

          E,      69     1/8          3

          F,       99     3/8          1

          G,      12     3/8          2

          H,       9      2/8          3

      ];

       

      I dont know how to add the date condition on below Code

      if([F2] = peek([F2]), peek(Rank),RecNo()) as Rank

       

      Thank you in advance everyone

       

      stalwar1 swuehl Qlik Sense App Development & Usage Qlik Sense Forums