' Set up % change from prior month With PT.PivotFields("Revenue") .Orientation = xlDataField .Function = xlSum .Caption = "%Change" .Calculation = xlPercentDifferenceFrom .BaseField = "In Balance Date" .BaseItem = "(previous)" .Position = 3 .NumberFormat = "#0.0%" End With
Note that with positional calculations, you cannot use the AutoShow or AutoSort method. This is too bad; it would be interesting to sort the customers high to low and to see their sizes in relation to each other.
Percentage of a Specific Item
Many companies have a goal to have service revenue exceed a certain multiplier of copier sales. You can use the xlPercentDifferenceFrom setting to express revenues as a percentage of the copier product line:
' Show revenue as a percentage of hardware With PT.PivotFields("Revenue") .Orientation = xlDataField .Function = xlSum .Caption = "% of Copier" .Calculation = xlPercentDifferenceFrom .BaseField = "ProductLine" .BaseItem = "Copier Sale" .Position = 3 .NumberFormat = "#0.0%" End With
by
updated