This demo shows two types of custom data calculations. Calculated fields and calculated items. Such calculated data in RadPivotGrid extends the data available directly from the Database, by providing expression or making more complex calculations.

The calculated field used in the demo is the "Average Price" field.
The difference between calculated AggregateField regular AggregateField in the declaration of RadPivotGrid is the presence of CalculationDataFields and CalculationExpression properties.

CalculationDataFields - DataFields that the calculation is based on.

CalculationExpression - The expression used for calculation.

Calculated item is such item that do not in the database, but it is calculated by custom server side logic. Such items in this demo are the"Forecast for 1999" items in the group shown as part of "Year" DataField.
To add such items you need to declarate PivotGridCalculatedItem inside CalculatedItems collection of PivotGridColumnField or PivotGridRowField
To perform the custom calculation for given item, you will need to handle the OnItemNeedCalculation of RadPivotGrid.