2.3.1 PivotTable What-if Analysis
PivotTable what-if analysis enables the editing of summarized values in an OLAP PivotTable ([ISO/IEC29500-1:2016] section 18.10) view, for example, editing summarized values in the PivotTable data area of the PivotTable view.
A CT_PivotEdits element, as specified in section 2.6.37, and its child CT_PivotEdit elements, as specified in section 2.6.38, specify the values in the OLAP PivotTable view that have been modified and the corresponding values in the OLAP PivotTable source data. The CT_PivotUserEdit child element, as specified in section 2.6.41, of the CT_PivotEdit element specifies a value or a formula. The location of the modified value in the OLAP PivotTable view is specified by a PivotTable rule specified by the CT_PivotArea element ([ISO/IEC29500-4:2016] section A.2) in this CT_PivotEdit element. The OLAP tuple that identifies the corresponding value in the OLAP PivotTable source data is specified by the CT_TupleItems element, as specified in section 2.6.43, in this CT_PivotEdit element.
A CT_PivotChanges element, as specified in section 2.6.39, and its child CT_PivotChange elements, as specified in section 2.6.40, specify the values in the OLAP PivotTable view that have been designated for OLAP allocation and the corresponding values in the OLAP PivotTable source data. The order of the CT_PivotChange elements determines the order in which they are designated for OLAP allocation. The CT_PivotChange element specifies a single edited value designated for OLAP allocation. An OLAP allocation value is specified by the CT_PivotEditValue child element, as specified in section 2.6.42, of the CT_PivotChange element. The allocationMethod attribute of the CT_PivotChange element specifies the OLAP allocation method. The OLAP tuple that identifies the location of the edited value in the OLAP PivotTable view and the corresponding value in the OLAP PivotTable source data is specified by the CT_TupleItems child element of the CT_PivotChange element.
For example, when an OLAP PivotTable is refreshed, the values designated for OLAP allocation, specified by the CT_PivotChanges element and its child CT_PivotChange elements, are sent to the OLAP data provider along with the OLAP allocation method indicating how to allocate the updated values. The OLAP data provider updates the values, and those new values are then refreshed and summarized in the data area of the PivotTable view, instead of summarizing the original values from the OLAP PivotTable source data.
If the enableEdit attribute of the CT_PivotTableDefinition element, as specified in section 2.6.32, is "false", CT_PivotEdits and CT_PivotChanges elements MUST NOT exist in this part. PivotTable what-if analysis is enabled if, and only if, the enableEdit attribute of the CT_PivotTableDefinition element is "true" and the PivotTable source data is OLAP.