Pivot Table Tip: Calculate Percentage Between Two Fields.


Hello, Excellers welcome to another blog post in my 2019 #FormulaFriday #Excel tips series. Today let’s take a look at creating a formula or a calculation within an Excel Pivot Table.

If you want to go back to basics and learn the basics then you may want to view my YouTube Video on Creating Your First Pivot Table.

How To Create Your First Pivot Table.

But, if you are happy enough with Pivot Tables and are keen to up your skills even more then read on to find out how to use Calculated Fields.

In this example, I want to calculate the percentage between two of my fields. In particular, the number of Sales Returns vs Sales Orders i.e what percentage of my Orders have been subsequently Returned. We will be working with my data set below.

Create A Calculated Field In Pivot Table
Create A Calculated Field In Pivot Table

What Are Calculated Fields?.

I like to think of a calculated field as a virtual extra column of data I have added created from other existing columns from the Pivot Table. For example in our data set up, we have the number of sales and the number of returns for each product. This means we do not have to write a formula, apply the formula to our data set or check that any new lines of data added have been updated also with this formula. Sounds like a good solution right?.

Adding A Calculated Field To A Pivot Table.

For example we want to calculate the % of returns of our sales orders. We have both of these fields in our Pivot Table.

  • Select any cell in your Pivot Table
  • Pivot Table Tools | Analyze
  • Calculation Group | Fields, Items & Sets
  • Select Calculated Field from the drop-down list
Insert A Pivot Table Calculated Field
  • Give your Calculated Field a name by filling in the Name part of the dialog box. I am calling this example % Returns.
  • Go ahead and write your formula. Choose your fields from the field list below the formula box. You can manually type the formula or double click to use the fields you require. In my example % returns is represented by the formula below.
Create A Custom Calculated Field In A Pivot Table
Create A Custom Calculated Field In A Pivot Table
  • Next, just Hit Ok when your formula is done.
  • The Calculated Field will now be available alongside the regular field list in your Pivot Table.
Pivot Table Fields
Pivot Table Fields

My new field is working just great. So, even though it is a simple formula, I do not have to add any new columns to my original data set which as well as saving me time also avoids any bloating of my data set. If I add new data to my data source it all gets automatically updated and calculated. Awesome!.

Calculate % Of Returns In Pivot Table
Calculate % Of Returns In Pivot Table

So, that is how to use a calculated field in an Excel Pivot Table. Have you used them before?.

What Next? Want More Tips?

1

So, if you want more top tips then sign up for my Monthly Newsletter where I share 3 Tips on the first Wednesday of the month and receive my free Ebook, 30 Excel Tips.

 

 

 

A Full list Of Formula Friday Blog Posts
Learn Excel With Our Excel Online Courses

Do You Need Help With An Excel Problem?.

I am pleased to announce I have teamed up with Excel Rescue,  where you can get help FAST.

ExcelRescue.net

Udemy.com Home page 125x125

Barbara

Barbara is an experienced data analyst with over 20 years of experience. Author of the How To Excel At Excel Top 50 Excel tips Ebook, YouTuber and Excel Blogger.

Recent Posts