Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.06 KB

Excel.PivotField.BaseField.md

File metadata and controls

46 lines (28 loc) · 1.06 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
PivotField.BaseField property (Excel)
vbaxl10.chm240095
vbaxl10.chm240095
Excel.PivotField.BaseField
6f8fae2c-fb56-3d24-9a77-31074c84701b
05/04/2019
medium

PivotField.BaseField property (Excel)

Returns or sets the base field for a custom calculation. This property is valid only for data fields. Read/write Variant.

Syntax

expression.BaseField

expression A variable that represents a PivotField object.

Remarks

This property is not available for OLAP data sources.

Example

This example sets the data field in the PivotTable report on Sheet1 to calculate the difference from the base field, sets the base field to the field named ORDER_DATE, and then 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

[!includeSupport and feedback]