This function returns the highest-levels count in
the dimension in a specified dimension.
This function is designed specifically to allow you
to view how many levels are there in a specific dimension. It doesn't
count the parent level members. It just displays a count of how many
such parent levels exist .The function takes as a parameter the name
of the database and the name of the dimension in which you are counting
the levels.
The function has the following syntax:
Syntax: OLAPDimMaxLevel
(database, dimension)
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 dimension and that you want to access / enter the cell
reference which has the name of this Database.
- Dimension : Enter the name of the dimension
which exists in this database mentioned above and is the dimension
whose High-Levels you wish to take a count of / instead enter
the cell reference which has the name of such a dimension.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The dimension must exist within this database
and it should be referenced by the accurate and exact name.
- 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 OLAPDimMaxLevel function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name and the dimension name. If you don't want
to manually enter the member you can use another function called
OLAPDimension in order to get this value and then use that cell
as a reference for a formula.
- In the following example B1 is the cell that
holds the database name, B5 is the name of the dimension, the
levels of which you wish to count.
=OLAPDimMaxLevel
($B$1, $B$5) |
The above formula returns a value = 2 which
signifies that in the database "Acuity" (B1), in the dimension
Time (Periods) (B5) , there are two high levels in the dimension which
basically means that the there are 2 hierarchy levels for the Time
dimension.