Example of Calculated Field in Blazor Pivot Table Component
In this sample, Total Units acts as the calculated field. Users can insert a new basic arithmetic expression based on the existing measure items either through a dialog at runtime or through code behind.
Grand Total |
---|
Grand Total | No records to display |
The calculated field feature allows users to create custom fields which are not present in the actual data source. Users
can create these fields using basic mathematical expression collaborating with existing fields. Calculated fields
can be created through UI dialog as well as code behind and it can be enabled by setting the AllowCalculatedField
property in SfPivotView to true. Use the
PivotViewCalculatedFieldSetting to configure the calculated field in code behind along with the following properties.
Name |
: Specifies the given calculated field with unique name. |
Formula |
: Specifies to set the formula based on the given data source. |
More information on the calculated field feature can be found in this documentation section.