DeepSee MDX Reference
HEAD
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Returns a subset from the start of a set, using the current order of the set.
Returned Type
This function returns a set.
Syntax and Details
HEAD(set_expression, optional_integer_expression, optional_sample_flag)
This function returns a set that consists of the specified number of elements from the start of the given set (considering the current order of the set). If integer_expression is less than 1, the function returns the empty set. If integer_expression is greater than the number of elements of the set, the function returns the original set.
The elements of the subset are returned in the same order specified by the original set.
Example
SELECT MEASURES.[%COUNT] ON 0, HEAD(birthd.decade.MEMBERS, 3) ON 1 
FROM patients
                             Patient Count
1 1910s                                  71
2 1920s                                 223
3 1930s                                 572
See Also