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

Returns a set of elements from a given set, by position. The first member is at position 0.
Returned Type
This function returns a set.
Syntax and Details
SUBSET(set_expression, first_element_position, optional_element_count)
Where:
Example
SELECT MEASURES.[%COUNT] ON 0, SUBSET(homed.city.MEMBERS, 0, 3) ON 1 FROM patients

                             Patient Count
1 Cedar Falls                         1,188
2 Centerville                         1,155
3 Cypress                             1,221
In contrast, consider this example, which shows the complete set:
SELECT MEASURES.[%COUNT] ON 0, homed.city.MEMBERS ON 1 FROM patients

                             Patient Count
1 Cedar Falls                         1,188
2 Centerville                         1,155
3 Cypress                             1,221
4 Elm Heights                         1,266
5 Juniper                             1,197
6 Magnolia                            1,156
7 Pine                                1,139
8 Redwood                             1,144
9 Spruce                              1,135