6 Replies Latest reply: Jun 25, 2013 7:53 AM by Raja Kaliyamoorthy RSS

    Create an ascending Key Calculation

      Hi Community,

       

      I have a requirement to have a Qlikview Report with these structure:

       

      RecordKeyOrderNumLineNumVAT
      11230X1
      11231X1
      21240X0
      21241X1
      21242X2
      31250X01
      31251X1

       

       

      Basically, the column OrderNum, LineNum and VAT are cointained in the source data and I would need to create RecordKey column through a calculation (because I want the user to select the ordernums). Recordkey is a number that starts in 1 for the first OrderNum and increases for each ordernum but not each line.

       

      I have tried to accomplish that by using the rank function in this way but with no good result:

       

      =rank(ONLY(OrderNum),4,1)

       

      Can anybody help me with this please?

       

      Thanks

      Julian