How to add and use calculated fields in Pivot Tables

Learn how to add, customise and use calculated fields in Excel or Google. Discover how to change fields names or formulas in your Pivot Tables.

Do you need to add a custom field in your Pivot Table? You want to create an additional calculated field but you don’t know how to do it? No worries, Ted Jordan is here to help!

At first, using a Pivot Table in Excel or in Google Sheets can seem tricky but you will discover that adding a new calculated field is pretty easy. Follow our tutorial to add, personalise and use calculated fields in your Pivot Tables. For Excel or Google Sheets, we created an easy guide just for you!

Once your Pivot Table is created in Excel, follow these straightforward steps to create a new calculated field.

Click on your Pivot Table: the Pivot Table Analyse tab will appear on top the Excel window.

Click on Pivot Table Analyse>Fields, Items & Sets>Calculated Field

After clicking on Calculated Field, a window will pop up: Insert Calculated Field.

Name: enter the name of the new field.
Formula: enter the formula of your calculated field.
Two ways of doing it:

Double-click the name of the fields you want to use and add manually mathematical signs.
OR
Select each field you need for the formula and click “Insert Field”, then add manually mathematical signs.

In this example, we want to create a calculated field in our Excel Pivot Table, to calculate the price of each object, per unit. We call it “Price per Unitâ”and the formula is Price per Unit=Cost/’Nb of objects’.

Click OK and the new calculated field is now appearing in your Pivot Table.

A new calculated field has been added to a pivot table in Excel.

You may have noticed that the names of our existing fields and the new calculated field are different too. We did change their names; also the name of the new field is not what we want to use.

In order to modify the name of a field in a Pivot Table, check the steps below or go directly to Field Settings (Pivot Table Analyse>Field Settings).

There are various ways of changing the name of a field in Pivot Tables, here are two:

Example 1 – Changing a field name in Excel

In your Pivot Table, click the cell you want to modify and type directly its name.

>>>

If you use a field name which existing exists, you will have an alert message like this one:

Example 2 – Changing a field name in Excel

In your Excel Pivot Table, double-click the cell containing the name you want to modify: a window will pop up “Pivot Table Field“. Change the field name directly in it and click OK.

The Source Field is the name of a field in the source data (for example, the data selected to create your Pivot Table).
Meanwhile, the Field name corresponds to the name shown in your Pivot Table for a specific field.

For example, in our case, Source Field is “Nb of objects” and Field name is “Ordered”. “Nb of objects” is the name used in our source data while “Ordered” is what is shown in our Pivot Table.

Source data

Field name

Now that the names are changed in your Pivot Table, maybe you noticed an error in the formula you entered for your calculated field? If you want to change the formula of your calculated field, go back to the Calculated Field window.

To correct the formula of one of your calculated fields, go back to Pivot Table Analyse>Fields, Items & Sets>Calculated Field

When you see the Insert Calculated Field window, select the Field you want to modify by clicking the green arrow.

You can now change the formula and click OK or Modify to save the changes you made.

We do recommend to add IFERROR in your formula so your Pivot Table will not contain any error messages. To learn how to use the IFERROR function in Excel, check this tutorial.

Adding a new calculated field in your spreadsheet is easy! Once your Pivot Table is created, click the Edit button.

The Pivot table editor window will open; then click Add and select Calculated Field to add a new field to your Pivot Table.

Now enter the formula you want to use for your calculated field. Note that if you enter a name with more than one word, you have to use ‘ or the formula will be incorrect.

Your calculated field formula is entered and you can see the new field in you Pivot Table but you want to change its name? Just change its name directly in the Pivot Table!

In order to modify the name of a field in your Pivot Table, just click the cell with the name you want to change and type the new name you wish to use.

Now, you know how to add calculated fields in Pivot Tables!

Discover more tutorials to become an Excel expert: IFNA function, IFERROR function, VLOOKUP, etc.

Advertising
Analytics

Categories

AllAdvertisingFormatsPlatformsKPI'sAd News

What is O&O Advertising?

Discover one more important jargon term used in Programmatic Advertising: O&O advertising. Get familiar with O&O formats and advantages.

Read More
What is Programmatic Advertising?

What is Programmatic Advertising?

Understand what programmatic advertising is and how it works to increase your ROI and become a programmatic specialist.

Read More

Best DSPs for Programmatic Advertising

Ted Jordan shares his list of best DSPs for Programmatic Advertising so you don’t have to lose time searching the internet to find the right Demand-Side Platform for your campaigns.

Read More
Programmatic Advertising: What is a DSP?

What are DSPs?

A DSP is a great tool to use but what does DSP stand for in marketing? What are some Demand-Side Platforms examples? Today, we answer your questions!

Read More
Programmatic Advertising: What is a SSP?

Supply-Side Platforms (SSPs) Explained

SSPs basics in advertising: learn what Supply-Side Platforms are used for and who use them. Get familiar with more programmatic advertising technical terms.

Read More

Advertising News – 09 June 2024

This week, we'll explore Google's latest algorithm update and it's massive impact on independent websites, the newly passed media Freedom Act in the EU aimed at protecting journalists, and a...

Read More

Categories

AllFunctionsToolsShortcut Keys

How to change shapes in Excel column charts

Learn how to easily change the columns shape in your Excel charts so your colleagues and customers will remember your impacting graphs.

Read More
Split Semicolon Separated Value in Excel

How to split semicolon separated values in Excel

Split semicolon separated values in Excel into columns and rows, or convert columns to semicolon separated values, like an Excel Master!

Read More

How to use the LEFT, RIGHT and MID functions

Learn how to extract text in Excel with the LEFT, RIGHT and MID functions. Plenty of examples to learn from and functions are explained with simple words. If you start...

Read More

Excel IF statement: how to use it for 3 conditions

Learn how to use the Excel IF statement with multiple conditions and combine it with OR and/or AND functions!

Read More
Navigating with Tab, Enter, and Shift Key on Excel.

How to move between cells when arrow keys are not working (Excel)

Learn how to move between Excel cells without using your mouse or arrow keys. Discover more shortcuts and tricks below!

Read More

How to use the IFERROR function (Excel + Google Sheets)

Discover how to use IFERROR in Excel or in Google Sheets in 4 easy steps! No more errors on your documents or dashboards with IFERROR.

Read More