10 Replies Latest reply on Jan 16, 2013 4:25 PM by d.bb

    Rank Tie with Suffix

    d.bb

      Am using the following to create a ranking measure, which works the way I need it to:

       

      IF ISNULL([Measure]) THEN

         NULL

      ELSE

         IIF([Measure] == LOOKUP([Measure], -1), PREVIOUS_VALUE(1), INDEX(), 1)

      END

       

      So, with a column having the values of 10, 30, 30, 30, 45, 80, the above ranks them thus, while maintaining index position for the non-ties:

       

      1

      2

      2

      2

      5

      6

       

      However, I would like to add a tie suffix to these values, as follows:

       

      1

      2t

      2t

      2t

      5

      6

       

      Any push in the right direction would be greatly appreciated.

       

      -D