Share via


PivotTableChangeList.Add Method (Excel)

Adds a ValueChange object to the specified PivotTableChangeList collection.

Version Information

Version Added: Excel 2010

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.

See Also

Concepts

PivotTableChangeList Object Members

PivotTableChangeList Object