PivotTableChangeList.Add method (Excel)
Adds a ValueChange object to the specified PivotTableChangeList collection.
Syntax
expression.Add (Tuple, Value, AllocationValue, AllocationMethod, AllocationWeightExpression)
expression A variable that represents a PivotTableChangeList object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Tuple | Required | String | The MDX tuple of the value to change in the OLAP data source. |
Value | Required | Double | The value to commit. |
AllocationValue | Optional | Variant | The value to allocate when performing what-if analysis. If this parameter is not supplied, the default allocation value of the OLAP server will be used. |
AllocationMethod | Optional | Variant | The method to use to allocate this value when performing what-if analysis. If this parameter is not supplied, the default allocation method of the OLAP server will be used. |
AllocationWeightExpression | Optional | Variant | The MDX weight expression to use for this value when performing what-if analysis. If this parameter is not supplied, the default allocation weight expression of the OLAP server will be used. |
Return value
ValueChange
Remarks
The Add method enables you to add ValueChange objects that represent changes to the PivotTable report through code. Doing so will add to the UPDATE CUBE statement that Excel constructs based on this change list. Note that if the user changes the allocation settings so that not all changes have the same settings, Excel will run multiple UPDATE CUBE statements, one for each group of changes that were made while the same settings were applied.
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.