CUBESET()

SyntaxCUBESET(connection,set_expression,caption,sort_order,sort_by)

Definition. This function returns a calculated set of members by sending a set expression to the cube on the server, which creates the set and then returns that set to Excel. The content of the cell and the actual value of the cell are different.

Arguments

Background. When you use CUBESET() as an argument for another cube function, the set instead of the displayed value is used in the argument.

Note

In the cell containing the function, the message #GETTING_DATA temporarily appears while the data is being queried.

Error values and messages provide information about incorrect or missing entries:

ExampleThe formula

=CUBESET("offline","[Stores].[Store].Children",
   "all store sales",2,"[Measures].[Sale]")

returns the sorted set of all stores based on the sales (all products and years). The store with the largest sale is listed first.

You can use the cell containing the formula to create cell labels. The actual content of the cell is more informative if it refers to the cells with the CUBESET() entries.

See Also

All other cube functions, GETPIVOTDATA()