Use a calculated field when you want to use the data from another field in your formula. Use a calculated item when you want your formula to use data from one or more specific items within a field.
- Click the report.
- On the PivotTable toolbar, click PivotTable or PivotChart, point to Formulas, 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.
To use the data from another field in the formula, click the field in the Fields box, and then click Insert Field. For example, to calculate a 15% commission on each value in the Sales field, you could enter = Sales * 15%.
- Click Add, and then click OK.
Add a calculated item to a field
- If items in the field are grouped, right-click each group, point to Group and Outline on the shortcut menu, and then click Ungroup.
- Click the field where you want to add the calculated item.
- On the PivotTable toolbar, click PivotTable or PivotChart, point to Formulas, and then click Calculated Item.
- In the Name box, type a name for the calculated item.
- In the Formula box, enter the formula for the item.
To use the data from an item in the formula, click the item in the Items list, and then click Insert Item (the item must be from the same field as the calculated item).
- Click Add, and then click OK.
- If you ungrouped items in step 1, regroup them if you want.
For example, if a calculated item named Strawberries has a formula of =Oranges * .25 across all months, you can change the formula to =Oranges *.5 for June, July, and August.
- Click a cell for which you want to change the formula.
To change the formula for several cells, hold down CTRL and click the additional cells.
- In the formula bar, type the changes to the formula.
- Click the report.
- On the PivotTable toolbar, click PivotTable or PivotChart, point to Formulas, and then click Solve Order.
- Click a formula, and then click Move Up or Move Down.
- Continue until the formulas are in the order that you want them to be calculated.
Note When you add a formula to a PivotChart report or its associated PivotTable report, some chart formatting may be lost.
You can display a list of all the formulas in your report. Click the report, click PivotTable or PivotChart on the PivotTable toolbar, point to Formulas, and then click List Formulas.