This function returns the number of users in the group
in the currently open database.
The OLAPUserGroupCount function is designed specifically
to allow you to count the number of users for a specified group in
a specified database. This function returns a number that equals the
total count of user names for the group in a database that you are
connected to.
The function has the following syntax:
Syntax: OLAPUserGroupCount
(database ,group)
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 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.
- 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 and count
/ enter the cell reference which has the name of this group.
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 group name specified that is within
the database that is specified in the database parameter.
- Both 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 OLAPUserGroupCount 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 user group whose users you
wish to count and enter the name of the user group which resides
in the database , and stores the user names that you want to access
and count. You can also manually type in the database name.
- 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 for which this function tracks the user
group called "UserGroup" and then for this group it
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.
=OLAPUserGroupCount($B$1,
"UserGroup" ) |
The above function returns a value = "
2 " which is the total count of the user names that are included
in the user group specified above and referenced as "UserGroup"
and which exists in the database "Acuity" (B1).