Team
I need pivot for below table. where count of type needs to be displayed against team names something like below. but when I run the below code, the column headings ("not operation", "operation" )does not display. it only shows total count.

Team Type
aa Operation
bb not operation
aa not operation


Pivot
Team "Operation" "Not operation"
aa 1 1
bb 1

    With ActiveSheet.PivotTables("PivotTable2").PivotCache
        .RefreshOnFileOpen = False
        .MissingItemsLimit = xlMissingItemsDefault
    End With
    
    ActiveSheet.PivotTables("PivotTable2").RepeatAllLabels xlRepeatLabels
    
    ActiveWorkbook.ShowPivotTableFieldList = True
    With ActiveSheet.PivotTables("PivotTable2").PivotFields("Team")
        .Orientation = xlRowField
        .Position = 1
    End With
    
    With ActiveSheet.PivotTables("PivotTable2").PivotFields("Type")
        .Orientation = xlColumnField
        .Position =1
    End With
     
    ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _
            "PivotTable2").PivotFields("Type"), "Count of Type", _
        xlCount