Question: how to create a formula in excel pivot table?
Answer: Click the PivotTable. ... 
On the Analyze tab, in the Calculations group, click Fields, Items, & Sets, and then click Calculated Field.
In the Name box, type a name for the field.
In the Formula box, enter the formula for the field. ... 
Click Add.