Skip to main content


The CUBESETCOUNT function returns the number of items in a set.

cubesetcount function 1




  • set (required): A text string of an Excel expression that evaluates to a set as defined by the CUBESET function. Alternatively, set can be the CUBESET function, or a reference to a cell that contains the CUBESET function.

Return Value

The CUBESETCOUNT function returns an integer.

Function Notes

  • The #GETTING_DATA… message is displayed while the data is being retrieved.


I have a table here named “sales2021” which includes the information of sales and rating of different products of 2 categories across the year 2021. I’ve already used the CUBESET function in a report table to get the total sales of certain products/months for specific months/products. To use the CUBESETCOUNT function to get the number of items in the sets in cells G12 and L5 where contain the CUBESET function, please copy or enter the formulas below in cells J14 and J15 respectively, and press Enter to get the results:



cubesetcount function 2

√ Note: Instead of the cell reference, you can copy the CUBESET function as the set argument:

=CUBESETCOUNT(CUBESET("ThisWorkbookDataModel",($G$8,$G$6,$G$7,$G$10,$G$11,$G$9),"Grand Total"))

Related functions

Excel CUBESET Function

The CUBESET function defines a calculated set of members or tuples by sending a set expression to the cube on the server. The function can extract all unique values from a set expression, and it offers options for sorting.

Excel CUBEVALUE Function

The CUBEVALUE function returns an aggregated value from a cube filtered by multiple member_expression arguments.

Excel CUBEMEMBER Function

The CUBEMEMBER function retrieves a member or tuple from a cube if it exists. Otherwise, a #N/A error value will be returned.


The CUBEKPIMEMBER function returns the key performance indicator (KPI) property and displays the KPI name in the cell.

The Best Office Productivity Tools

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations