This function returns the specified user in the current
database.
The OLAPUser function is designed specifically to
allow you to view the names of the user that correspond with an index
number specified for the user that are created and attached to a specified
database. This function returns the name of the user within the database.
The function has the following syntax:
Syntax: OLAPUser
(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 users created for the purpose of security and these are the
user you want to access / enter the cell reference which has the
name of this Database.
- Index : Enter the index number corresponding
to the required user's name 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 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 OLAPDatabase 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 OLAPUser function from the list
of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name and type in the index number for the user
in that database for which security has been enabled.
- In the following example B1 is the cell that
holds the database name, and the number 3 is the index of the
user in this database and the user's name corresponding to this
index will be returned by the function.
The above formula returns a value = " Jeff
" which is the value for the name of the user at the index 3(index)
in the database "Acuity" (B1).