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 and does not correspond to a column in the source data (section 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, column axis (section, or page axis (section of a PivotTable view (section

An OLAP PivotCache (section MUST not have calculated fields.