Standard Rank

Version 2

    Description:

     

    This is a ranking function with ties. Tied items share the higher rank.

     

     

     

     

    Example Calculation:

     

     

    IF ISNULL(SUM([Sales])) THEN

      NULL

    ELSE

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

    END

     

     

     

    Inputs and Setup:

     

    An aggregate measure such as "SUM([Measure])", or a calculation producing one.

     

     

    Partitioning and Addressing:

     

    Direction that SUM([Sales]) is sorted in table, or an "Advanced" field sort on SUM([Sales]).

     

     


    Comments:

     

    After a tie occurs and two rows share the same rank, the next row's rank is unaffected - it is the same rank that it would have had if there had been now tie above it. Values of 5, 3, 3, 2 would produce ranks 1, 2, 2, 4.

     

     

    Related Functions:

     

     

     

    Further Reading/Examples:

     

    Adopted from James Baker: http://community.tableau.com/thread/108967