CUBESET
Syntax:
CUBESET ( connection , set-expression [ , [ caption ] [ , [ sort-order ][ , [ sort-by ] ] ] ] )
CUBEVALUE
function, the CUBERANKEDMEMBER
function to choose specific members from the calculated set, and the CUBESETCOUNT
function to control the size of the set. Arguments:
Name |
Type |
Description |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
connection |
text |
The name of the connection to the cube. |
||||||||||||||||||||||||
set-expression |
text, reference |
A set expression that results in a set of members or tuples. set-expression can also be a cell reference to range that contains one or more members, tuples, or sets included in the set. |
||||||||||||||||||||||||
caption |
text |
The text displayed in the cell instead of the caption from the cube (assuming it defines such a caption). |
||||||||||||||||||||||||
sort-order |
text |
The type of sort, if any, to perform; it can be one of the following:
An alphabetic sort for a set of tuples sorts on the last element in each tuple. |
||||||||||||||||||||||||
sort-by |
text |
The value by which to sort.
example: : To get the city with the highest sales, set-expression would be a set of cities, and sort-by would be the sales measure. To get the city with the highest population, set-expression would be a set of cities, and sort-by would be the population measure.
|
Return Type and Value: any – The set of members or tuples.
However, if
The connection name is not a valid workbook connection stored in the workbook, the return value is unspecified.
The OLAP server is not running, not available, or returns an error message, the return value is unspecified.
The syntax of member-expression is incorrect, the return value is unspecified.
The set contains at least one member with a different dimension than the other members, the return value is unspecified.
sort-order is outside the range 0–6,
#N/A
is returned.sort-order requires sort-by, but sort-by is omitted,
#VALUE!
is returned.
CUBESET("Sales","[Product].[All Products].Children",
"Products",1,"[Measures].[Sales Amount]")
]