AddFilterValue (Method)

Applies To:

OLAPLabel, OLAPMeasures

Description:

Adds a new filter value and returns an object that represents the new item.

The AddFilterValue (Method) supports only the Select MembersFromDatabase operator type. The AddFilter (Method) uses all operator types for side labels and measures for all supported OLAP engines.

Note:

You can only use this method to apply a filter to a measure value against an Essbase database. You cannot use an alias.

Syntax:

OLAPLabel.AddFilterValue(MemberName As String, Operator As BqOperator)
OLAPMeasure.AddFilterValue(ColumnIndex As String, Operator As BqOperator, MeasureValue As String)

Expression Required:

An expression that returns an OLAPLabel or OLAPMeasure object.

Constants:

The AddFilterValue (Method) uses the BqOperator constant group, which consists of these values:

Example 1:

This example shows how to add the new filter AZ item to the side label:

OQPath = ActiveDocument.Sections["OLAPQuery"]
OQPath.SideLabels[1].AddFilterValue(‘AZ’,bqOperatorEqual)
OQPath.Process()
OQPath.Activate()

Example 2:

This example shows how to add a filter value to a Profit measure. The operator equals 13,438.

ActiveDocument.Sections["OLAPQuery"].Measures["Profit"].AddFilterValue
('1',bqOperatorEqual,'13438')

Example 3:

This example shows how to add a filter value to a Name measure:

ActiveDocument.Sections["OLAPQuery2"].TopLabels["Name"].AddFilterValue("[Eastern Winds]", bqOperatorEqual)

Example 4:

This example shows how to add a filter value to the Name measure. This example places the filter value in brackets to use a URL.

ActiveDocument.Sections["OLAPQuery2"].TopLabels["Name"].AddFilterValue("[www.easternwinds.com]", bqOperatorEqual)