Extracts a member from a tuple.
Extracts a tuple from a set.
tuple[.Item] ( index )
OR
Item ( tuple, index )
tuple | The tuple from which to get a member. |
index | Numeric position (starting from 0) of the member to extract from the tuple. A valid value for index is from 0 to 1 less than the size of the input tuple. A value of less than 0, or greater than or equal to size of the input tuple, results in an empty member. |
set[.Item] ( index )
OR
Item ( set, index )
set | The set from which to get a tuple. |
index | Numeric position (starting from 0) of the tuple to extract from the set. A valid value for index is from 0 to 1 less than the size of the input set. A value of less than 0, or greater than or equal to size of the input set, results in an empty tuple. |
SELECT {( [Qtr1], [Sales], [Cola], [Florida], [Actual] ).Item(3)} ON COLUMNS FROM Sample.Basic
returns:
Florida |
---|
5029 |
SELECT {Item(( [Qtr1], [Sales], [Cola], [Florida], [Actual] ), 2)} ON COLUMNS FROM Sample.Basic
returns:
Cola |
---|
22777 |
The following query
SELECT {CrossJoin ( [Market].CHILDREN, [Product].CHILDREN ).ITEM(0)} ON COLUMNS FROM Sample.Basic
returns the first tuple in the set CrossJoin([Market].CHILDREN, [Product].CHILDREN)
,
which is ([East], [Colas])
:
East |
---|
Colas |
12656 |
The above query can also be written as:
SELECT {CrossJoin ( [Market].CHILDREN, [Product].CHILDREN )(0)} ON COLUMNS FROM Sample.Basic
because the ITEM keyword is optional.
Consider the following crossjoined set of Market and Product members:
{ ([East],[100]),([East],[200]),([East],[300]),([East],[400]),([East],[Diet]), ([West],[100]),([West],[200]),([West],[300]),([West],[400]),([West],[Diet]), ([South],[100]),([South],[200]),([South],[300]),([South],[400]),([South],[Diet]), ([Central],[100]),([Central],[200]),([Central],[300]),([Central],[400]),([Central],[Diet]) }
The following example
CrossJoin([Market].CHILDREN, [Product].CHILDREN).item(0)
returns the first tuple of the crossjoined set, ([East],[100])
, and the following example
CrossJoin([Market].CHILDREN, [Product].CHILDREN).item(0).item(1)
returns [100]
, the second member of the first tuple of the crossjoined set.
©2004 Hyperion Solutions Corporation. All Rights Reserved. http://www.hyperion.com |