What Is a Calculated Field?
A Calculated Field in a PivotTable is a custom field that you create by using a mathematical expression to perform calculations in the PivotTable. You can also use a Calculated Field in pivot table to perform mathematical calculations on the data without changing the data in the source worksheet.
Insert Calculated Item into Excel Pivot Table
Step 1 – Create a Pivot Table
- Organize your data in a table.
- Select all the data in the dataset.
- Go to the Insert tab.
- Pick the PivotTable command from the ribbon.
- Choose the From Table/Range option.
A PivotTable from table or range wizard will pop up.
- Define the PivotTable. We have defined cell I4 on the Existing Worksheet.
- Press OK.
PivotTable Fields will appear on the right side of the worksheet.
- Select the parameters that you want to have in the PivotTable from the PivotTable Fields. We have taken Sales Rep, Month and Sales as parameters.
- Define Rows and Columns from the PivotTable Fields.
A PivotTable will be created.
Step 2 – Insertion of Calculated Item
The Calculated Item feature is used to insert new calculations inside a previously created PivotTable. As we have created a PivotTable on sales in each month in the previous section, we will insert their quarterly commission as Calculated Item.
- Select Row Labels or Column Labels from the Table.
- Go to the PivotTable Analyze tab.
- Choose Fields, Items, & Sets from the ribbon.
- Click on Calculated Item…
An Insert Calculated Item wizard will appear. We have set Month as a parameter; the wizard shows as Insert Calculated Item in “Month”.
- Enter a descriptive name for the new item in the Name field and enter a formula in the Formula field in Insert Calculated Item as shown in the following image. You can use items in other fields in the formula but you can’t use worksheet functions. In our example, we have entered Qtr1 Commission in the Name field and this formula in the formula field:
=10%*(Jan+Feb+Mar).
- Click Add.
The item Qtr1 Commission will be inserted into the Items list.
- Using the above-mentioned process, create three more items for the conditions mentioned below:
Name field: Qtr2 Commission, Formula field: =11%*(Apr+May+Jun)
Name field: Qtr3 Commission, Formula field: = 12%*(Jul+Aug+Sep)
Name field: Qtr4 Commission, Formula field: = 12.5%*(Oct+Nov+Dec)
- The newly added data will appear in the table.
It will automatically be updated in the PivotTable.
Read More: How to Create Calculated Field in Pivot Table Data Model
Download Practice Workbook
<< Go Back to Calculated Field in Pivot Table | Pivot Table in Excel | Learn Excel
This is great, thank you.
But is there a way to have calculated item not included in the total calculation?
Hi Yenny,
Thanks for your query.
You can use the calculated items option only for those fields which are available in our pivot table. Because if the field did not show in the pivot table, the corresponding field will also not show in the item section of the dialog box, which appears after clicking on Fields, Items, & Set,