This function returns the nth dimension in
a specified cube within a specified database.
This function is designed specifically to allow you
to list a specific dimension whose name you wish to access from a
cube in a specified database. The function takes as a parameter the
name of the database, the index number for the cube from within the
database, the name of which you want displayed.
The function has the following syntax:
Syntax: OLAPCubeDimension
(database, cube, n)
Explained below are the 3 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.
- N : Enter the index of the dimension in the
cube specified above, the name of which you want displayed.
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.
- The index number for the dimension must be
a valid number corresponding with a specific dimension in the
cube and should not be a number that is smaller or greater than
a valid number for the dimension, the name of which the function
has to return.
- The value for parameter "n" must
be a positive real integer.
- These 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 OLAPCubeDimension 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.
- Also enter the index number for a dimension
in the cube.
- In the following example B1 is the cell that
holds the database name, and B2 is the cell that holds the cube
name which has dimensions, and the function will display the name
of the nth dimension .
=OLAPCubeDimension
($B$1, $B$2, 3) |
The above formula returns a value = Time (Periods) which
signifies that in the database "Acuity" (B1), in the cube
"AP_Trans" (B2) the 3rd dimension (n) is the
above mentioned dimension "Time".