7 Replies Latest reply: Jun 13, 2013 1:16 PM by migle purzelyte RSS

    How do I mark TOP/BOTTOM 10 entrys in a table with multiple dimensions

      Hello everyone.

       

      I have this table:

       

      StuffOfInterest:

      ( YearMonth, ShelfID, Value)

       

      After loading it in the script, I want to add a field called Priority to the table.

      That field should just say 'H' (as in high) for the 10 entrys with highest value for each YearMonth and shelf.

      How do I manage that? I have no problem in selecting the top 10 entrys for just YearMonth, but as I said:
      I want this top-10 marking for YearMonth AND ShelfID.

       

      Can someone in this community enlighten me?

       

      Then it would also be great if it could read 'L' (as in Low) for the 10 entrys with lowest value, and 'M' (as in Medium) for every other entry.

      If that would be doable it would be even more great.

       

      Hoping for insight...