CUBESETCOUNT function
the number of items in a set.
Cube · Guided Excel example
Where can you use it?
Data model and business intelligence teams. When checking measures, members and sets in a cube report, adapt the model and connection names to your workbook.
Scenario in the workbook
Count the members of a valid set. Replace column A with the real cube connection name. Match the sample MDX identifiers to your data model.
A worked example from the workbook
| Row | A | B | C |
|---|---|---|---|
| 6 | Connection | Member or set | Selection |
| 7 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
| 8 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
| 9 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
Record 1
=CUBESETCOUNT(CUBESET(A7,B7))Illustrative outputDepends on model
See the inputs and instructions for all 3 examplesWorked examples
Count the members of a valid set. Replace column A with the real cube connection name. Match the sample MDX identifiers to your data model.
Column F provides expressions as text. Satisfy the stated requirements, then paste into an empty Excel cell and compare with column G. The result was not verified in desktop Excel here.
| Row | A | B | C |
|---|---|---|---|
| 6 | Connection | Member or set | Selection |
| 7 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
| 8 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
| 9 | SalesCube | {[Region].[North],[Region].[South],[Region].[East]} | Regions |
| Trial | Expression | Sample output |
|---|---|---|
| Record 1 | =CUBESETCOUNT(CUBESET(A7,B7)) |
Depends on model |
| Record 2 | =CUBESETCOUNT(CUBESET(A8,B8)) |
Depends on model |
| Record 3 | =CUBESETCOUNT(CUBESET(A9,B9)) |
Depends on model |