rank

Returns the rank value of the selected data items. The type of ranking returned (Olympic, dense, or serial) is data source dependent. The sort order is optional; DESC is assumed by default.

Syntax

rank ( numeric_expression [ ASC|DESC ] [ tuple member_expression { ,
 member_expression } ] within set set_expression )

Example

rank ( [gosales].[sales measures].[quantity] tuple [gosales].[Staff].
[].[department] -> [West] within set children ( [gosales].[Staff].[].
[Staff] ) )