Info

setting. In this case, you must specify that the BaseField is ShipDate and that the Baseltem is something called (previous):

' Set up % change from prior month With PT.PivotFields("Revenue") .Orientation = xlDataField .Function = xlSum .Caption = "%Change"

.Calculation = xlPercentDifferenceFrom .BaseField = "ShipDate" .Baseltem = "(previous)" .Position = 3 .NumberFormat = "#0.0%" End With

Note that with positional calculations, you cannot use the AutoShow or AutoSort methods. 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.

0 0

Post a comment