Skip to main content

PivotGridField.OlapExpression Property

Gets or sets an expression used to evaluate values for the current unbound field in OLAP. This is a dependency property.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v22.1.dll


public string OlapExpression { get; set; }

Property Value

Type Description

A string that represents an expression used to evaluate values for the current field in OLAP.


The code below shows how to set an unbound expression for OLAP:

using DevExpress.Xpf.PivotGrid;

public MainWindow() {
    // ... 
    var fieldPriceWithDiscount= new PivotGridField() { Caption = "Price with Discount", Area = FieldArea.DataArea }; 

    fieldPriceWithDiscount.OlapExpression = "[Measures].[Internet Standard Product Cost] * 0.9";


The same unbound expression in XAML:

    <dxpg:x:Name="fieldPriceWithDiscount" Caption="Price with Discount"  Area="DataArea" AreaIndex="1"
                         OlapExpression="[Measures].[Internet Standard Product Cost] * 0.9" />

Use the PivotGridField.UnboundExpression property to get or set an unbound expression for regular data sources.

To learn more about unbound fields, see Unbound Fields.

See Also