Quick Navigation
CUBESETCOUNT Function
Summary
The CUBESETCOUNT function returns the total number of items within a set created by the CUBESET function. This is essential for Power Pivot and OLAP cube analysis, enabling dynamic counting of set members without manual enumeration.
Syntax
CUBESETCOUNT(set)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| set | Text/String or CUBESET reference |
Yes | A reference to a cell containing a CUBESET function, the CUBESET function itself, or a text string that evaluates to a CUBESET-defined set |
Using the CUBESETCOUNT Function
CUBESETCOUNT is used in multidimensional data analysis to determine the size of sets created with CUBESET. It's particularly valuable when building dynamic reports that need to adapt to changing cube data structures or when validating set operations before further calculations.
Common CUBESETCOUNT Examples
Count Items in Named CUBESET Cell
=CUBESETCOUNT(A3)
Returns the number of items in the set stored in cell A3 (which contains a CUBESET formula)
Direct CUBESETCOUNT with Inline CUBESET
=CUBESETCOUNT(CUBESET("Sales","[Product].[All Products].Children","Products",1,"[Measures].[Sales Amount]"))
Counts the child products in the All Products hierarchy from the Sales cube
Frequently Asked Questions
Common Errors and Solutions
#VALUE!
Cause: Set argument doesn't evaluate to a valid CUBESET
Solution: Verify the CUBESET function creates a valid set first
#GETTING_DATA…
Cause: Cube connection is retrieving data
Solution: Wait for data retrieval to complete
Notes
- Available in Excel 2007 and later versions
- Part of Excel's OLAP analysis toolset
- Temporarily shows #GETTING_DATA… during evaluation
- Requires active connection to Analysis Services or Power Pivot
Compatibility
Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365
Not available in: Excel 2003 and earlier
Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+