1 Reply Latest reply: Aug 16, 2013 8:44 AM by Cesar Accardi RSS

    Displaying value by specific row number

      Hello, im new to qilkview and appreciate all the help I can get :-)


      Im trying to display an arrival time in a piviot table for each customer ID. Some of them have multiple times and thats why I need to specify which one i want to display by choising the row number. The first and the last time can be shown by using min and max but how do i display the times inbetween those?



      LOAD * INLINE [

          ID, Time

          32-588, 17:00

          32-588, 18:00

          32-588, 19:00

          32-588, 20:00

          32-589, 09:00

          32-589, 10:00

          32-589, 11:00




      ID1st time2nd time3rd timelast time
      32-588=min(time)row number 2 in timetablerow number 3 in timetable=max(time)


        • Re: Displaying value by specific row number
          Cesar Accardi



          There is an additional parameter rank for the aggregation functions min and max that you could use.


          Extracted from QlikView help:


          min([{set_expression}][ distinct ] [ total [<fld {, fld}>]] expression [, rank]))

          Returns the numeric minimum value of expression or field iterated over the chart dimension(s). Rank defaults to 1 which corresponds to the lowest value. By specifying rank as 2 the second lowest value will be returned. If rank is 3 the third lowest value will be returned and so on.




          min( Sales, 2 )