[Previous] [Contents] [Next]

Percentage of Total

To get the percentage of the total, specify xlPercentOfTotal as the Calculation property for the page field:

' Set up a percentage of total
With PT.PivotFields("Revenue")
    .Orientation = xlDataField
    .Caption = "PctOfTotal"
    .Function = xlSum
    .Position = 2
    .NumberFormat = "#0.0%"
    .Calculation = xlPercentOfTotal
End With


[Previous] [Contents] [Next]