This function returns the specified group in the current
database.
This function is designed specifically to allow you
to view any user group created during the task of securing the database.
The function returns the text for the name of the group that corresponds
with the index specified, for a specific database.
The function takes as a parameter the name of the
database, and the index of the group whose name is displayed as the
resultant value.
The function has the following syntax:
Syntax: OLAPGroup
(database, index)
Explained below are the 2 parameters that have to
be provided when building this function.
- Database : Enter the name of the database which
has security enabled and which consists of user-groups created
for securing the database / enter the cell reference which has
the name of this Database.
- Index : Enter the index number which corresponds
to the user-group created as part of the security for a database.
It is the name of this group that will be displayed as the result
of the function.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The value for the parameters that take an "Index"
must be a positive real integer and should correspond to the argument
that you want to access (User Group) for the function to return
appropriate values.
- 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 OLAPGroup function from the list
of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, and the index of the User-Group whose name
you want to access as the result of this function.
- In the following example B1 is the cell that
holds the database name, and the digit 1 is the index that corresponds
to a User-Group in the database mentioned in B1. The group name
that corresponds with the index 1 will be returned as the result
of the function.
The above formula returns a value = "UserGroup"
which signifies that in the database "Acuity" (B1), the
group corresponding to the index number 1 is referenced by the name "UserGroup".
This is the name that was specified by the creator of user groups
when creating this group and it stands as such in the database at
present.