This function returns the number of members in a set.
Syntax
CUBESETCOUNT(set)
Argument
- set (required): A set defined using the CUBESET() function, or a reference to a cell that contains members of the cube.
Background
The result of this function is an integer. If the argument causes an error, that error will also be returned as the result.
Example
If you reference a cell in the CUBESETCOUNT() function that returns the sorted set of stores, such as with the formula:
=CUBESET(« offline », »[Stores].[Store Name].Children »; « all sales »;2; »[Measures].[Sale] »)

the result will be 4. You’ll get the same result if you pass this entire formula as an argument directly to CUBESETCOUNT(). Note that the keyword Children is not context-sensitive.