4 Replies Latest reply: Jun 19, 2015 2:39 AM by kushal chawda RSS

    Manual data iteration problem in load script.

    Jakub Szurogajlo

      Hello!

       

      I am having a problem with ranking data as per my needs.

      I tried in SQL directly and with use of QV functions.

       

      I want to achieve rank as per below example

       

      Employee

      TypeWeekRank
      A1101
      A1111
      A2122
      A1133
      B3101
      B2112
      B3123
      B2134
      B2144

       

      1. Rank should reset for next employee (row 5)

      2. When Type is the same continuously, week by week, Rank stays the same. (rows 1 & 2)

      2. When Type changes, rank changes as well (row 3)

      3. When same Employee and Type combination is occurring again, but not as continuation, Rank must change (row 2 & 4, as was divided by different type in row 3

       

      How to achieve that?

       

      Regards!