This function returns the number of users in the currently
open database.
The OLAPUserCount function is designed specifically
to allow you to count the number of users in a specified database.
This function returns a number that equals the total count of user
names for the database connected to.
The function has the following syntax:
Syntax: OLAPUserCount
(database)
Explained below is the 1 parameter that has to be
provided when building this function.
- Database : The name of the database which has
security enabled and has the "Users", whose names this
function will access and return a count for / enter the cell reference
which has the name of this Database.
Remarks
- If a connection is not established with a database
the result will be a #value.
- The user names that you want to access and
count, should exist in the database that is specified in the database
parameter.
- All the 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 OLAPUserCount function from the
list of functions provided and click "Ok".
- When building the formula enter the cell range
for the database name that has the users whose count you want
to access. You can also manually type in the database name.
- In the following example B1 is the cell that
holds the database name for which this function counts the total
number of users that are created for securing the database and
this counted number is the value that will be returned by the
function.
The above function returns a value = "
5 " which is the total count of the user names that are included
in the database "Acuity" (B1).