Cubes
CUBESETCOUNT
Not yet implemented
No catalogue row at this commit. Pivot tables are being implemented in full, and this function with them. How we measure this
Local names in 40 languages
| Language | Name in Excel |
|---|---|
| Arabic | CUBESETCOUNT |
| Bulgarian | CUBESETCOUNT |
| Czech | CUBESETCOUNT |
| Danish | KUBESÆT.ANTAL |
| German | CUBESETCOUNT |
| Greek | CUBESETCOUNT |
| English (Australia) | CUBESETCOUNT |
| English (United Kingdom) | CUBESETCOUNT |
| English (United States) | CUBESETCOUNT |
| Spanish | RECUENTOCONJUNTOCUBO |
| Estonian | CUBESETCOUNT |
| Finnish | KUUTIOJOUKKOJENMÄÄRÄ |
| French | NBJEUCUBE |
| Hebrew | CUBESETCOUNT |
| Croatian | CUBESETCOUNT |
| Hungarian | KOCKA.HALM.DB |
| Indonesian | CUBESETCOUNT |
| Italian | CUBESETCOUNT |
| Japanese | CUBESETCOUNT |
| Korean | CUBESETCOUNT |
| Lithuanian | CUBESETCOUNT |
| Latvian | CUBESETCOUNT |
| Norwegian | KUBESETTANTALL |
| Dutch | KUBUSSETAANTAL |
| Polish | LICZNIK.MODUŁÓW.ZESTAWU |
| Portuguese (Brazil) | CUBESETCOUNT |
| Portuguese (Portugal) | CONTARCONJUNTOCUBO |
| Romanian | CUBESETCOUNT |
| Russian | КУБЧИСЛОЭЛМНОЖ |
| Slovak | CUBESETCOUNT |
| Slovenian | CUBESETCOUNT |
| Serbian (Latin) | CUBESETCOUNT |
| Swedish | KUBUPPSÄTTNINGANTAL |
| Thai | CUBESETCOUNT |
| Turkish | KÜPKÜMESAYISI işlevi |
| Ukrainian | CUBESETCOUNT |
| Vietnamese | CUBESETCOUNT |
| Chinese (Simplified) | CUBESETCOUNT |
| Chinese (Hong Kong) | CUBESETCOUNT |
| Chinese (Traditional) | CUBESETCOUNT |
Names from Microsoft's support site.
What it does
CUBESETCOUNT(set)
CUBESETCOUNT is the smallest function in the cube family and the only one that is purely an
accessor: it reports the cardinality of a set that CUBESET has already built.
The number of items in a set. Not the number of distinct members across all hierarchies, and not a measure — the count of top-level items the set contains, where each item may itself be a tuple.
It is the natural loop bound for the CUBERANKEDMEMBER pattern: build a set once with
CUBESET, ask CUBESETCOUNT how many items it has, then index into it with
CUBERANKEDMEMBER(…, 1), (…, 2), and so on. Without it, a workbook has no way to know how
far a server-side set extends, because the members never come to the client.
Note what it does not take: no connection argument. CUBESETCOUNT is the only function in
the family with no connection parameter, because the set handle it is given already carries its
own connection. That absence is the clearest evidence that a CUBESET cell is a handle to
server-side state rather than a piece of text.
Arguments
CUBESETCOUNT(set)
set(required) — Microsoft describes it as "a text string of a Microsoft Excel expression that evaluates to a set defined by the CUBESET function". In practice that is either aCUBESET(…)call written inline or, far more commonly, a reference to a cell containing one.
The misunderstanding to guard against: this argument is not an ordinary text value. A cell
containing the literal text of a set expression is not a set; a cell containing a CUBESET
formula is. The two look identical to a reader, and the documentation's phrase "a text string
of a Microsoft Excel expression" invites exactly that confusion. The same identity-versus-display
distinction runs through the whole family — see CUBEMEMBER.
Try it
This example needs an Excel cube connection. OneCalc cannot provide that connection in this preview.
Quirks
Result and edge cases
A number: the item count.
While the request is outstanding the cell displays #GETTING_DATA…, which Microsoft documents
for this function as for the rest of the family — a transient extended-family placeholder
catalogued in the value universe, not a failure. Its presence
here is itself informative: even a "pure count" can require a round trip, because the set may
not have been enumerated on the server yet.
Whether an empty set yields 0 or an error is not stated in the documentation, and the
Handbook does not know. It is listed below as a probe.
Errors
Microsoft's page for CUBESETCOUNT documents no error conditions of its own — unusually for
this family, it lists only the #GETTING_DATA remark. That is a real gap in the documentation
rather than a claim that the function cannot fail: an invalid set argument, a dead connection
behind the referenced CUBESET, and an errored CUBESET cell must all produce something,
and the Handbook cannot say what from the source.
What can be said honestly: an error value arriving in the set argument would, under the
Handbook's shared coercion discipline, be expected to propagate — coercion never silently
discards a worksheet error (see coercion and lifting).
That is the general engine rule, not an observation of this function.
How to implement
Notes for implementers
- The absent connection argument means the set value must carry its own connection binding.
Any implementation modelling a
CUBESETresult as plain text will be unable to implementCUBESETCOUNTat all. - The
#GETTING_DATAremark implies the count may be a server round trip rather than a local property. An implementation is not free to assume the set is already materialized. - Because the documentation lists no errors, an implementation targeting Excel compatibility here has nothing to copy and must be driven by observation.
Rust code
This entry has no Rust implementation yet.
No implementation has been published with a Handbook test suite for this function.
Version differences
No comparison between specific Excel builds is recorded here yet. This does not establish that all builds behave alike.
Alternatives
Relationships
CUBESET— the only sensible source of thesetargument.CUBESETCOUNThas no independent existence.CUBERANKEDMEMBER— the companion accessor.CUBESETCOUNTgives the upper bound,CUBERANKEDMEMBERretrieves the item at each rank. The pair is the family's iteration idiom.COUNT/COUNTA/ROWS— the functions readers reach for by analogy, and none of them apply. ACUBESETresult is one cell holding a handle, soROWSandCOUNTAsee one cell regardless of how many members the set contains.
Named variants
No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents