Returns an integer that indicates the rank of the given member, within the given set.
Example
For example, the following query shows the rank of the member colord.green within the set of members of the colord dimension, when the members are ranked by patient count:
SELECT RANK(colord.green, colord.MEMBERS, MEASURES.[%COUNT]) ON 0 FROM patients
Green
Results 2
To see that this is correct, consider the following query, which sorts the members of this dimension by the patient count:
SELECT MEASURES.[%COUNT] ON 0,
ORDER(colord.MEMBERS, MEASURES.[%COUNT]) ON 1 FROM patients
Patient Count
1 None 1,243
2 Green 1,304
3 Blue 2,381
4 Orange 1,302
5 Purple 1,276
6 Red 1,244
7 Yellow 1,250