This function returns the number of dimensions in
the specified cube within a specified database. This function is designed
specifically to allow you to list the count of dimensions in a particular
cube in a specified database. The function takes as a parameter the
name of the database and the index number for the cube from within
the database, the name of which you want displayed.
The function has the following syntax:
Syntax: OLAPCubeDimCount
(database, cube-name)
Explained below are the 2 parameters that have to
be provided when building this function.
- Database : Enter the name of the database which
has the cube name that you want to access / enter the cell reference
which has the name of this Database.
- Cube-Name : Enter the name of the cube whose
dimensions you wish to count / enter the cell reference which
has the name of this cube.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The name of the cube must be a valid name and
should exist in the database to which a connection is made.
- Both arguments are compulsory and neither argument
is optional.
Example
This function may be easier to understand with an
example.
- 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 OLAPCubeDimCount function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, and the cell range for the cube name, or
you can manually enter the database and cube name. If you don't
know the cube names in a particular database, you can also first
access the cube name through the OLAPCube function and then reference
that cell in this function where it asks for cube name.
- In the following example B1 is the cell that
holds the database name, and B2 is the cell that holds the cube
name whose dimensions are counted.
=OLAPCubeDimCount
($B$1, $B$2) |
The above formula returns a value = 4 which
signifies that in the database "Acuity" (B1), in the cube
"AP_Trans" (B2) there a exist total of 4 dimensions.