This function returns the current user in the group
in the current database.
The OLAPUserGroup function is designed specifically
to allow you to view the names of the user that correspond with an
index number specified for the current user that belongs to a specified
"User-Group" that was created and attached to a specified
database. This function returns the name of the user within such a
group of the database.
The function has the following syntax:
Syntax: OLAPUserGroup
(database, group, 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 users created for the purpose of security and these are the
users whose names you want to access / enter the cell reference
which has the name of this Database.
- Group : Enter the name of a user-group which
has users created for the purpose of security and these are the
users, within this group whose name you want to access / enter
the cell reference which has the name of this group.
- Index : Enter the index number corresponding
to the required user's name inside a user-group created in the
above mentioned database / enter the cell reference which has
this index as a value.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The value for parameter "index" must
be a positive real integer and should correspond to the value
for the user name in a user-group for that database, and this
is the result that the function has to return.
- 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 OLAPUserGroup function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name, enter the name of the user-group which
has the users you want to access and type in the index number
for the user in this user-group that is created for security pertaining
to the database entered above. If you don't want to manually type
in the name for the user group, use the OLAPGroup function and
access the user-groups name through that and reference the cell
with this value when building this current function.
- In the following example B1 is the cell that
holds the database name, "UserGroup" is the name of
the group created in PowerOLAP that has users in it, and is created
for securing the database. The number 1 is the index of the user
in this above mentioned user group that is in the database and
the user's name corresponding to this index for that group will
be the result returned by the function.
=OLAPUserGroup
($B$1, "UserGroup", 1) |
The above formula returns a value = " Jack
" which is the value for the name of the current user at the
index 1(index) in the group called "UserGroup" (group) which
is created for the database "Acuity" (B1).