Excel CUBESETCOUNT Function
The CUBESETCOUNT function returns the number of items in a set.
Syntax
=CUBESETCOUNT(set)
Arguments
- 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.
Example
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(G12)
=CUBESETCOUNT(L5)
√ 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
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.
The CUBEVALUE function returns an aggregated value from a cube filtered by multiple member_expression arguments.
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
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
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.