There was a need to add another pivot table. Different counts are made in the values ​​of the table. Each "Values" in the parameters is "Operation" and "Additional calculations." The first I ask is this:

pivotTable.AddDataField(pivotField, "Имя", Excel.XlConsolidationFunction.xlCount); 

But how to add additional calculations? In particular, % of the amount per line .

    1 answer 1

    The solution was a little different place, you need to add this calculation after creating the field:

     pivotTable.AddDataField(pivotField, "Name", Excel.XlConsolidationFunction.xlSum).Calculation = Excel.XlPivotFieldCalculation.xlPercentOfRow;