The requested page is not available for the requested platform. You are viewing the content for Default platform.

DashboardSqlDataSource.CalculatedFields Property

Provides access to a data source's calculated fields.

Namespace: DevExpress.DashboardCommon

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

Declaration

public CalculatedFieldCollection CalculatedFields { get; }
Public ReadOnly Property CalculatedFields As CalculatedFieldCollection

Property Value

Type Description
CalculatedFieldCollection

A CalculatedFieldCollection object containing calculated fields.

Remarks

Examples

The following code snippet shows how to create a new calculated field based on the values of the 'UnitPrice' and 'Discount' data fields, and add it to the existing DashboardSqlDataSource.

using DevExpress.DashboardCommon;
//...

            CalculatedField priceWithDiscount = new CalculatedField("[UnitPrice] * (1 - [Discount])");
            priceWithDiscount.DataMember = "SalesPerson";
            priceWithDiscount.Name = "Price with discount";
            sqlDataSource.CalculatedFields.Add(priceWithDiscount);
See Also