Skip to main content

MeasureDefinition.Expression Property

Gets a measure expression.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

public string Expression { get; }

Property Value

Type Description
String

A String that is the measure expression.

Example

The code snippet specifies window calculations for a Scatter Chart dashboard item across a window. View Example: How to add window calculations for numeric measures in code

using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
// ...
ScatterChartDashboardItem scatterChart = dashboardViewer1.Dashboard.Items[scatterChartName] as ScatterChartDashboardItem;
if (scatterChart != null)
{
    scatterChart.AxisXMeasure.Calculation = new DifferenceCalculation() { DifferenceType = DifferenceType.Percentage };
    scatterChart.AxisXMeasure.WindowDefinition = new ScatterWindowDefinition();
    scatterChart.AxisYMeasure.Expression = "WindowMedian(ToDouble(Sum([Extended Price]) - Lookup(Sum([Extended Price]), -1)) / Lookup(Sum([Extended Price]), -1), 0, 1)";
    scatterChart.AxisYMeasure.WindowDefinition = new ScatterWindowDefinition();
}
See Also