MDX.SET.PICK
Get an element from a set with the MDX.SET.PICK formula. The element is displayed with its caption. You can define the set with an MDX statement in the formula, or refer to an existing set.
To select an element, double-click the formula in the formula view. The Select Element dialog displays the set.
Syntax
=MDX.SET.PICK(Alias,Cube,Query,Element Choice)
Arguments
This table describes the arguments of the function:
Argument | Description | Example |
---|---|---|
Alias | Name of the database alias. | Foodmart 2008 |
Cube | Name of the cube. |
[Sales]
|
Query | MDX expression that defines the set, or the name of the set. |
[Time].[1997].CHILDREN
|
Element choice | Unique name of the displayed element. |
[Time].[1997].[Q1]
|
Example
In this example you define a set using the MDX statement CHILDREN MDX:
=MDX.SET.PICK("FoodMart
2008","Sales","[Time].[1997].CHILDREN", "[Time].[1997].[Q1]")
Query | Explanation | Set |
---|---|---|
[Time].[1997].Children |
This set contains all descendants of [1997] in the dimension [Time]. | [1997].[Q1],
[1997].[Q2], [1997].[Q3], [1997].[Q4], |
You can double-click this formula and select elements in the Select Element dialog. You cannot drill down to elements that are not in the set.
Example
Define a set using the MDX function TopCount.
=MDX.SET.PICK("Foodmart 2008","Sales","TopCount([Product].[All
Products].Children,2,"[Unit Sales]")","[Product].[All
Products].[Drink]")
Query | Explanation |
---|---|
TopCount(([Product]. [All Products].children,2,[unit sales]) |
This function selects the two elements with the highest sales figures ([Unit Sales]) from all descendants of [Product].[AllProducts]. |
You can double-click this formula and select from these elements in the Select Element dialog. You cannot drill down to elements that are not contained in the set.