220.127.116.11.8 Calculated Fields
Calculated fields allow users to add calculations to a PivotTable report (section 2.2.5). For example, if a PivotTable report contains values for sales and cost by products, but no profit values, a calculated field with the formula "=sales-cost" can be added so that profit values are calculated and can be analyzed in the PivotTable report.
A calculated field is a cache field (section 18.104.22.168.5) and does not correspond to a column in the source data (section 22.214.171.124.2). The values for a calculated field are calculated based on the formula specified for the calculated field. A calculated field is specified by the fCalculatedField field of the SXFDB record (section 2.4.283) being equal to 1. The formula is specified by the SXFormula record (section 2.4.288) following the SXFDB record.
A pivot field associated with a calculated field MUST NOT appear on the row axis (section 126.96.36.199.9.2), column axis (section 188.8.131.52.9.3), or page axis (section 184.108.40.206.9.1) of a PivotTable view (section 220.127.116.11).
An OLAP PivotCache (section 18.104.22.168.4) MUST not have calculated fields.