Creating Filters

You can create a filter for each set of access restrictions you need to place on database values. You need not create separate filters for users with the same access needs. After you have created a filter, you can assign it to multiple users or groups of users.

Note:

If you use a calculation function that returns a set of members, such as children or descendants, and it evaluates to an empty set, the security filter is not created. An error is written to the application log stating that the region definition evaluated to an empty set.

Before creating a filter, perform the following actions:

  • Connect to the server and select the database associated with the filter.

  • Check the naming rules for filters in Limits.

See Create Filters.

To create a filter, you can also use the create filter MaxL statement.

Filtering Members Versus Filtering Member Combinations

This topic illustrates different ways to control access to database cells. Data can be protected by filtering entire members or by filtering member combinations.

  • Filtering members separately affects whole regions of data for those members.

  • Filtering member combinations affects data at the member intersections.

    Figure 31-1 How Filters Affect Data AND/OR Relationships


    This image shows two cubes: the left cube illustrates the impact of OR relationships; the right cube illustrates the impact of AND relationships.

Note:

Filtering on member combinations (AND relationship) does not apply to metaread. Metaread filters each member separately (OR relationship).

Filtering Members Separately

To filter all the data for one or more members, define access for each member on its own row in Filter Editor. Filter definitions on separate rows of a filter are treated with an OR relationship.

For example, to block access to Sales or Jan, assume that user KSmith is assigned the following filter:

  • Access: None. Member specification: Sales.

  • Access: None. Member specification: Jan.

The next time user KSmith connects to Sample.Basic, her spreadsheet view of the profit margin for Qtr1 shows that she has no access to data values for the member Sales or the member Jan, which are marked with #NOACCESS. All data for Sales is blocked from view, as well as all data for January, inside and outside of the Sales member. Data for COGS (Cost of Goods Sold), a sibling of Sales and a child of Margin, is available, with the exception of COGS for January.

Figure 31-2 Results of Filter Blocking Access to Sales or Jan


This images shows a spreadsheet in which cells blocked by filters are marked with #NOACCESS.

Filtering Member Combinations

To filter data for member combinations, define the access for each member combination using a row in Filter Editor. In filter definitions, two member sets separated by a comma are treated as union of those two member sets (an AND relationship).

For example, assume that user RChinn is assigned the following filter: Access: None. Member specification: Sales, Jan.

The next time user RChinn connects to Sample.Basic, her spreadsheet view of the profit margin for Qtr1 shows that she has no access to the data value at the intersection of members Sales and Jan, which is marked with #NoAccess. Sales data for January is blocked from view. However, Sales data for other months is available, and non-Sales data for January is available.

Figure 31-3 Results of Filter Blocking Access to Sales, Jan


This images shows a spreadsheet in which Sales data for Jan is blocked for the user.

Filtering Using Substitution Variables

Substitution variables enable you to more easily manage information that changes regularly. Each substitution variable has an assigned name and value. The Database Manager can change the value anytime. Where a substitution variable is specified in a filter, the substitution variable value at that time is used.

For example, if you want a group of users to see data only for the current month, you can set up a substitution variable named CurMonth and define a filter (MonthlyAccess) wherein you specify access, using &CurMonth for the member name. Using an ampersand (&) at the beginning of a specification identifies it as a substitution variable instead of a member name to Essbase. Assign the MonthlyAccess filter to the appropriate users.

Each month, you need to change only the value of the CurMonth substitution variable to the member name for the current month, such as Jan, Feb, and so on. The new value will apply to all assigned users.

See Using Substitution Variables.

Filtering with Attribute Functions

You can use filters to restrict access to data for base members sharing a particular attribute. To filter data for members with particular attributes defined in an attribute dimension, use the attribute member in combination with the @ATTRIBUTE function or the @WITHATTR function.

Note:

@ATTRIBUTE and @WITHATTR are member set functions. Most member set functions can be used in filter definitions.

For example, assume that user PJones is assigned this filter: Access: None. Member specification: @ATTRIBUTE(“Caffeinated_False”).

The next time user PJones connects to Sample.Basic, his spreadsheet view of first-quarter cola sales in California shows that he has no access to the data values for any base dimension members associated with Caffeinated_False. Sales data for Caffeine Free Cola is blocked from view. Note that Caffeine Free Cola is a base member, and Caffeinated_False is an associated member of the attribute dimension Caffeinated (not shown in the above spreadsheet view).

Figure 31-4 Results of Filter Blocking Access to Caffeine-free Products


This images shows a spreadsheet in which Sales data for Caffeine Free Cola is blocked for the user.

Metadata Filtering

Metadata filtering provides data filtering and an additional layer of security. With metadata filtering, an administrator can remove outline members from a user's view, providing access only to those members that are of interest to the user.

When a filter is used to apply MetaRead permission on a member:

  1. Data for all ancestors of that member are hidden from the filter user’s view.

  2. Data and metadata (member names) for all siblings of that member are hidden from the filter user’s view.

Dynamic Filtering

You can create dynamic filters based on external source data to reduce the number of filter definitions needed. You do this using dynamic filter definition syntax, including the method @datasourceLookup and the variables $LoginUser and $LoginGroup.

For details, see Create Efficient Dynamic Filters.