Back to Devexpress

DashboardOlapDataSource.Filter Property

dashboard-devexpress-dot-dashboardcommon-dot-dashboardolapdatasource-8aa7ce29.md

latest2.3 KB
Original Source

DashboardOlapDataSource.Filter Property

Gets or sets the logical expression to be applied to the data for filtering.

Namespace : DevExpress.DashboardCommon

Assembly : DevExpress.Dashboard.v25.2.Core.dll

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
[DefaultValue(null)]
public string Filter { get; set; }
vb
<DefaultValue(Nothing)>
Public Property Filter As String

Property Value

TypeDefaultDescription
Stringnull

A String value specifying the logical expression to be applied to the data for filtering.

|

Remarks

Use dimension attribute unique names to refer to OLAP fields.

The code below shows how to set a filter criteria for the Calendar Year, Category, and Subcategory fields:

cs
olapDataSource.Filter = CriteriaOperator.And(
    new BinaryOperator("[Date].[Calendar Year].[Calendar Year]", "[Date].[Calendar Year].&[2001]"),
    new BinaryOperator("[Product].[Product Categories].[Category]", "[Product].[Product Categories].[Category].&[4]"),
    new BinaryOperator("[Product].[Product Categories].[Subcategory]", "[Product].[Product Categories].[Subcategory].&[31]")).ToString();

Refer to the following help topic for more information about building filter criteria: Expression Constants, Operators, and Functions

Note

You cannot build complex criteria to filter data in OLAP mode.

See Also

DashboardOlapDataSource Class

DashboardOlapDataSource Members

DevExpress.DashboardCommon Namespace