.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

PivotBehaviorOptions.AllowMultipleFieldFilters Property

Gets or sets a value indicating whether fields in the pivot table can have multiple filters applied to them at the same time.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll

Declaration

bool AllowMultipleFieldFilters { get; set; }

Property Value

Type Description
Boolean

true, to use more than one filter for a PivotTable field; otherwise, false.

The default value is false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowMultipleFieldFilters
PivotTable
.Behavior.AllowMultipleFieldFilters

Remarks

Set the AllowMultipleFieldFilters property to true to apply multiple filters to a single field in the row or column area of the PivotTable report. If the AllowMultipleFieldFilters property is false (the default value) and you try to apply more than one filter to a PivotTable field, only the last specified filter will be applied.

Examples

Dim worksheet As Worksheet = workbook.Worksheets("Report6")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")

' Allow multiple filters for a field.
pivotTable.Behavior.AllowMultipleFieldFilters = True

' Filter the "Date" field to display sales for the second quarter.
Dim field1 As PivotField = pivotTable.Fields(0)
pivotTable.Filters.Add(field1, PivotFilterType.SecondQuarter)

' Add the second filter to the "Date" field to display two days with the lowest sales.  
Dim filter As PivotFilter = pivotTable.Filters.Add(field1, pivotTable.DataFields(0), PivotFilterType.Count, 2)
filter.Top10Type = PivotFilterTop10Type.Bottom
See Also