BaseField Property

Applies To

PivotField object.

Description

Returns or sets the base field for a custom calculation. Valid only for data fields. Read/write Variant.

Example

This example sets the data field in the PivotTable on Sheet1 to calculate the difference from the base field, sets the base field to the field named "ORDER_DATE," and sets the base item to the item named "5/16/89."

With Worksheets("Sheet1").Range("A3").PivotField
    .Calculation = xlDifferenceFrom
    .BaseField = "ORDER_DATE"
    .BaseItem = "5/16/89"
End With