Skip to main content

DashboardSqlDataSource.CalculatedFields Property

Provides access to a data source’s calculated fields.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.1.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

public CalculatedFieldCollection CalculatedFields { get; }

Property Value

Type Description
CalculatedFieldCollection

A CalculatedFieldCollection object containing calculated fields.

Remarks

To learn more about calculated fields, see the following topics.

Example

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);

Implements

See Also