InterSystems MDX Reference
RANK


RANK(member_expression, set_expression, optional_numeric_expression)
SELECT RANK(colord.green, colord.MEMBERS, MEASURES.[%COUNT]) ON 0 FROM patients Green Results 2
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