' Set up Running Total With PT.PivotFields("Revenue") .Orientation = xlDataField .Function = xlSum .Caption = "YTD Total" .Calculation = xlRunningTotal .Position = 4 .NumberFormat = "#,##0,K" .BaseField = "In Balance Date" End With
Figure 21 shows the results of a pivot table with three custom calculation settings, as discussed earlier.
21. This pivot table presents four views of Sum of Revenue. Column O is the normal calculation. Column P is % of Total. Column Q is % change from previous month. Column R is the running total.