Rank (MDX)

Returns the rank (one-based position) of the tuple in the specified set (0 if not found).


Name Type Cardinality Default value
  tuple-expression  one   
  set-expression  one   
  numeric-expression  zero-one   




Returns the rank of the specified tuple in the set. If the tuple is not found 0 is returned.

If an numeric-expression is specified, the set is sorted in a descending order using this numeric-expression. Tuples with the same expression value have the same rank value.

The tuple set { A, B, C, D } with the respective numeric-expression values of { 2,1,2,4 } will be ranked as { B(rank=4), A(rank=2), C(rank=2), D(rank=1) }

This function is similar to: Rank( tuple, Order( tuple-set, numeric-expression, DESC) ). Note this MDX expression does not handle tuple with same value correctly.


Special Examples (errors, null, ...)

XMLA Properties

Find here the value of the XMLA properties when not specified otherwise.