This function returns the number of cubes in the currently
open database. This function is designed specifically to allow you
to view how many cubes are there in a specified database. The function
takes as a parameter the name of the database that is currently opened.
The function has the following syntax:
Explained below is the 1 parameter that has to be
provided when building this function.
- Database : Enter the name of the database which
is currently open and wherein you want to count the number or
cubes / enter the cell reference which has the name of this Database.
- If a connection is not established with a database
the result will be a #value.
- This argument is compulsory and not optional.
This function may be easier to understand with an
- In order to build this function with more ease,
open the specific database and bring a slice from that database
into Excel. In this way you will have connected to PowerOLAP because
you now have the OLAPOpen formula automatically on your sheet
when you bring a slice of the cube into Excel.
- In Excel, use the menu: Insert -> Function
and select PowerOLAP from the drop down list.
- Choose the OLAPCubeCount function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name or then manually type in the name of the
- In the following example B1 is the cell that
holds the database name. This database specified here has cubes
whose total number a user wishes to count. Therefore the database
referenced in the formula should be the one where you want to
The above formula returns a value = 2 which
signifies that in the database "Acuity" (B1), there exist
total cubes which equal 2.