The function uses this argument to determine the number of elements to return in the subset. If this argument is greater than the number of elements, all elements are returned.
The function evaluates this expression for each element of the set and sorts the elements of the set in descending order according to this value. Any hierarchies are ignored.
If this argument is omitted, the function uses the current order of the set elements (and this function behaves like the HEAD function).
Because count_expression is greater than the number of members, all members are returned. The members are sorted in ascending order according to the value of the %COUNT measure.
Next, consider a similar query, using count_expression equal to 3:
SELECT MEASURES.[%COUNT] ON 0,
TOPCOUNT(birthd.decade.MEMBERS, 3, MEASURES.[%COUNT]) ON 1 FROM patients
Patient Count
1 1970s 1,520
2 1960s 1,500
3 2000s 1,433
This query selects three members from the higher-valued end of the set.