Total Units
Example of Calculated Field in ASP.NET MVC Pivot Table Control
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.
FY 2015 | FY 2016 | FY 2017 | FY 2018 | Grand Total | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
In Stock | Units Sold | Total Units | In Stock | Units Sold | Total Units | In Stock | Units Sold | Total Units | In Stock | Units Sold | Total Units | In Stock | Units Sold | Total Units | |
France | 5066 | 46939 | 52005 | 5248 | 44513 | 49761 | 5581 | 48207 | 53788 | 1152 | 11516 | 12668 | 17047 | 151175 | 168222 |
Germany | 5614 | 44154 | 49768 | 5523 | 47910 | 53433 | 5462 | 47214 | 52676 | 1347 | 11419 | 12766 | 17946 | 150697 | 168643 |
United Kingdom | 2864 | 25457 | 28321 | 2991 | 23944 | 26935 | 2924 | 25836 | 28760 | 811 | 6375 | 7186 | 9590 | 81612 | 91202 |
United States | 5171 | 47724 | 52895 | 5442 | 47691 | 53133 | 4823 | 46602 | 51425 | 1199 | 11715 | 12914 | 16635 | 153732 | 170367 |
Grand Total | 18715 | 164274 | 182989 | 19204 | 164058 | 183262 | 18790 | 167859 | 186649 | 4509 | 41025 | 45534 | 61218 | 537216 | 598434 |
Field List
All Fields
- Quarter
- Year
- Order Source
- Products
- Product Categories
- Country
- Amount
- Units Sold
- In Stock
Filters
Rows
Columns
Values
Properties
|
The calculated field feature allows users to create custom fields which are not present in the actual data. 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 allowCalculatedField
as true. The
calculatedFieldSettings
property is available to configure the calculated field in code behind.