CUBESET(connection, set_expression [,caption] [,sort_order] [,sort_by])

Returns the calculated members returned from a cube.

connectionThe name of the connection.
set_expressionA SET expression.
caption(Optional) The text to overwrite any caption.
sort_order(Optional) The type of sort order to perform:
0 = SortNone (default)
1 = SortAscending
2 = SortDescending
3 = SortAlphaAscending
4 = SortAlphaDescending
5 = SortNaturalAscending
6 = SortNaturalDescending
sort_by(Optional) The name of the measure to sort by.

* Added in Excel 2007.
* This function will always be single threaded.
* Defines a calculated set of members or tuples by sending a set of expressions to the cube which creates the set and then returns that set.
* While the data is being retrieved #GETTING_DATA is displayed in the cell.
* You can use the CUBEKPIMEMBER function to return the name of a key performance indicator.
* You can use the CUBEMEMBER function to return the member or tuple from a cube.
* You can use the CUBEMEMBERPROPERTY function to return the value of a member property from a cube.
* You can use the CUBERANKEDMEMBER function to return the nth or ranked member in a set from a cube.
* You can use the CUBESETCOUNT function to return the number of items in a set.
* You can use the CUBEVALUE function to return the aggregated value from a cube.
* For the Microsoft documentation refer to


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited Top