@RANK

Returns the rank of the specified members or the specified value among the values in the specified data set. The rank of a value is equivalent to its position (its rank) in the sorted data set.

Syntax

@RANK (SKIPNONE | SKIPMISSING | SKIPZERO | SKIPBOTH, value, expList)
ParameterDescription

SKIPNONE

Includes all cells specified in expList, regardless of their content, during calculation of the rank.

SKIPMISSING

Excludes all #MISSING values from expList during calculation of the rank.

SKIPZERO

Excludes all zero (0) values from expList during calculation of the rank.

SKIPBOTH

Excludes all zero (0) values and #MISSING values from expList during calculation of the rank.

value

(1) The member or member combination for which the rank is calculated, or (2) a constant value for which the rank is calculated.

expList

Comma-delimited list of member specifications, variable names, functions, or numeric expressions. expList provides a list of numeric values across which the rank is calculated.

Notes

Example

The following example is based on the Sample Basic database. Assume that the Measures dimension contains an additional member, Sales Rank. Essbase ranks the sales values for a set of products:

"Sales Rank" = @RANK(SKIPBOTH,Sales,
@RANGE(Sales,@LEVMBRS(Product,1)));

This example produces the following report. Since SKIPBOTH is specified in the formula, the #MI value for Sales->Diet Drinks is not included in the ranked list:

                 New York   Actual    Jan
                   Sales       Sales Rank
                   =====       ==========
Colas               678            1
Root Beer           551            4
Cream Soda          663            2
Fruit Soda          587            3
Diet Drinks         #MI          #MI