CUBESETCOUNT Function

Counts the members in a cube set.

Category

Cube

Available in

Excel 2007+ for Windows, Microsoft 365

Returns

A number

Overview

CUBESETCOUNT tells you how many members a CUBESET contains — how many products sold this month, or how many customers are in a segment.

It's also handy for building lists that stop at the right length.

Syntax

=CUBESETCOUNT(set) Explain

Arguments

ArgumentRequired?What it does
setYesA cell holding a CUBESET formula, or a CUBESET formula itself.

Examples

Example 1 — How many products are in the set?

B1 holds a CUBESET of all products.

=CUBESETCOUNT(B1) Explain

Example 2 — List only as many ranks as there are members

Leave the cell empty once the rank runs past the end of the set.

=IF(A3<=CUBESETCOUNT($B$1),CUBERANKEDMEMBER("ThisWorkbookDataModel",$B$1,A3),"") Explain

Common mistakes

  • #VALUE! or an error. The argument must be a set (a CUBESET), not a member or a range of values.

Notes

Kyle Stott

Author

Kyle Stott

Certified Microsoft Excel Expert

Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.