OLAPFilters (Collection)

Member of:

(CubeQuery) QuerySection object

Description:

Represents a collection of filters defined in the data layout for the query. This is a standard collection and may be indexed numerically or by dimension name. A Member name cannot be used because two dimensions may have members with the same name.

The Add (Method) adds a new filter to the end of the collection. If there is a filter defined for the given dimension, or the dimension or member do not exist, an exception is thrown. The MemberLocation parameter must be a fully qualified path to a member, including its dimension and all intermediate members, delimited by periods “.”. If the dimension name or any member name contains a period, it must be escaped using a backslash. The optional Variable arguments can be used to set the initial values of the OLAPFilter Variable property If the given member location cannot be mapped to a valid dimension and member, an exception is thrown.

Example:

This example shows how to show the count of filters in the query (note that if the value of Count is zero, there are no filters conditions):

Application.Alert(ActiveDocument.Sections["Query"].Filters.Count)

Methods:

Add(Dimension as String, MemberLocation as String, [optional] Variable as Boolean), Item(Value as Name or Index), RemoveAll

Properties:

Read only: Count as Number