Excel like a finance pro.
← The libraryPractice · 2 questions →
Cube function
CUBESETCOUNT
Returns the number of items in a cube set.
Rarely usedDifficulty 1600 · ExpertUsage rank #516 of 520
When to use it
How many members a cube set contains.
The shape of it
- Syntax
=CUBESETCOUNT(set)
Worked examples
Set size
=CUBESETCOUNT(A1) → 24
A1 holds a CUBESET of all products.
Inline set
=CUBESETCOUNT(CUBESET("Sales","TopCount([Product].[Product].Children,5,[Measures].[Sales])")) → 5
A top-five set.
Drive a ranking
=SEQUENCE(CUBESETCOUNT(A1)) → 1 to 24
Ranks for a CUBERANKEDMEMBER list in Microsoft 365.
Worth knowing
- Size a report area before filling it with CUBERANKEDMEMBER.
- Counts members after any filter in the set expression.
- Accepts a cell holding a CUBESET or the function itself.
Where it goes wrong
- #N/A when the argument is not a set.
- Empty sets return 0.
Related
Learn the moves here — or let Wauvel run them on your numbers.
Meet your AI CFO →One CFO-grade Excel tip a week
A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.