You are on page 1of 10

7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

(https://www.contextures.com/index.html)

Calculated Field or Calculated Item


In an Excel pivot table, what is the difference between calculated fields and calculated items? When
should these formulas be used, and what are their differences?

Introduction

About Pivot Table Formulas

About Calculated Items

About Calculated Fields

Calculated Item Example

Calculated Field Example

List All Pivot Table Formulas

Download the Sample File

More Tutorials

Introduction
In a pivot table, you can use custom formulas to create calculated fields and calculated items. This
tutorial will show examples of both types of pivot table formulas, and when they should be used.

The key difference between them is that:

Calculated Fields are formulas that can refer to other fields in the pivot table.
Calculated Items are formulas that can refer to other items within a specific pivot field.

In this example, we'll set up a pivot table with both types of formulas, to see where and how they work.
Click the links below for detailed information on each type of formula:

Using Calculated Items in Pivot Tables


(https://www.contextures.com/excelpivottablecalculateditem.htm)
Using Calculated Fields in Pivot Tables (https://www.contextures.com/excel-pivot-table-
calculated-field.html)

This video shows the difference between the two types of formulas, and shows how to set up a
calculated item, and a calculated field, and then print a list of all the formulas.

https://www.contextures.com/calculatedfieldcalculateditem.html 1/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

About Pivot Table Formulas


Use custom formulas in an Excel pivot table, to create calculated fields and calculated items.

There are a few general restriction on using formulas though:

Formulas are available only in non-OLAP-based pivot tables


You can't create formulas that refer to the pivot table totals or subtotals.
Formulas can't refer to worksheet cells by address or by name.

After you create formulas in a pivot table, you can use a built-in command to create a list of all the
formulas (https://www.contextures.com/excel-pivot-table-calculated-field.html#videolist) in a pivot
table.

About Calculated Items


Here are the key features of pivot table calculated items:

A calculated item becomes an item in a pivot field.


Its calculation can use the sum of other items in the same field.
The individual records in the source data are calculated, and then the results are summed.
Calculated items are listed with other items in the Row or Column area of the pivot table.
Calculated items are NOT shown in the PivotTable Field List.

Click here to learn how to set up Calculated Items in Pivot Tables


(https://www.contextures.com/excelpivottablecalculateditem.htm)

Calculated Item Warning


If you create a calculated item in a field, the following restrictions will be placed on that pivot field:

You will NOT be able to move the field to the Report Filters area
You will NOT be able to add multiple copies of a field to the Values area.

https://www.contextures.com/calculatedfieldcalculateditem.html 2/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

About Calculated Fields


Here are the key features of pivot table calculated fields

Use calculated fields to perform calculations on other fields in the pivot table.
For calculated fields, the individual amounts in the other fields are summed, and then the
calculation is performed on the total amount.
Sum is the only function available for a calculated field.
A calculated field becomes a new field in the pivot table, and its calculation can use the sum of
other fields.
Calculated fields appear with the other value fields in the pivot table. Like other value fields, a
calculated field's name may be preceded by Sum of.
Calculated fields appear in the PivotTable Field List.

Click here to learn how to set up Calculated Fields in Pivot Tables


(https://www.contextures.com/excel-pivot-table-calculated-field.html)

Calculated Item Example


You can create a calculated item when you want to perform calculations on specific items in a pivot
field.

In the example shown below, the Order Status field has four items -- Backorder, Canceled, Pending
and Shipped.

In the Order Status field, you could create a calculated item named Sold, that sums the orders with a
status of Shipped, Pending, or Backorder, but doesn't include Canceled orders.

https://www.contextures.com/calculatedfieldcalculateditem.html 3/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

In the screen shot below, the Sold calculated item is showing, and the Backorder, Pending and Shipped
items have been hidden.

Calculated Field Example


Use calculated fields to perform calculations on other fields in the pivot table. In this example, each
sales representative receives a 3% bonus if they sold more than 100 units.

The calculated field formula checks the value in the Units field, and calculates the bonus amount based
on 3% of the Total field.

=IF(Units>100,Total*3%,0)

https://www.contextures.com/calculatedfieldcalculateditem.html 4/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

Here is the result, with the bonus showing in the applicable rows.

NOTE: A calculated field cannot check the text value of a label, so use filtering or calculated items to
show only the applicable items.

List All Pivot Table Formulas


If you’ve used calculated items and calculated fields in your pivot table, you can quickly create a list of
all the formulas.

NOTE: The list shows all of the formulas in the selected pivot table's pivot cache, even if those
formulas are not currently displayed in the pivot table.

List the Formulas


Follow these steps to create the list of pivot table formulas:

1. Select any cell in the pivot table.


2. On the Ribbon, under the PivotTable Tools tab, click the Analyze tab.
3. In the Calculations group, click Fields, Items, & Sets
4. Click List Formulas.

https://www.contextures.com/calculatedfieldcalculateditem.html 5/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

List of Formulas
A new sheet is inserted into the active workbook, with a list of the selected pivot table's formulas.

Calculated fields (if any), are listed first, and then the Calculated Items (if any). The Solve Order is also
shown, with a note on how the solve order works
(https://www.contextures.com/excelpivottablecalculateditem.htm#solve) and how to change it.

Download the Sample File


Click the link to download the sample file (/pivotsamples/calcitemcalcfield.zip) that was used in the
Calculated Field and Calculated Item example. The zipped file is in xlsx format, and does not contain
macros.

More Tutorials
FAQs - Pivot Tables (https://www.contextures.com/xlfaqPivot.html)

Pivot Table Introduction (https://www.contextures.com/xlPivot01.html)

Calculated Field - Count (https://www.contextures.com/excelpivottablecalculatedfieldcount.html)

https://www.contextures.com/calculatedfieldcalculateditem.html 6/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

Calculated Items (excelpivottablecalculateditem.htm)

Multiple Consolidation Ranges (https://www.contextures.com/xlPivot08.html)

Running Totals (https://www.contextures.com/xlPivot14.html)

Summary Functions (https://www.contextures.com/excel-pivot-table-summary-functions.html)

Clear Old Items in Pivot Table (https://www.contextures.com/xlPivot04.html)

More Tutorials
Pivot Tables FAQs (https://www.contextures.com/xlfaqPivot.html)

Pivot Table Intro (https://www.contextures.com/xlPivot01.html)

Calculated Field - Count


(https://www.contextures.com/excelpivottablecalculatedfieldcount.html)

Calculated Items (excelpivottablecalculateditem.htm)

Multiple Consolidation Ranges (https://www.contextures.com/xlPivot08.html)

Running Totals (https://www.contextures.com/xlPivot14.html)

Summary Functions (https://www.contextures.com/excel-pivot-table-summary-functions.html)

Clear Old Items in Pivot Table (https://www.contextures.com/xlPivot04.html)

(https://www.contextures.com/signup01)

https://www.contextures.com/calculatedfieldcalculateditem.html 7/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

(/xlPivotPremAddIn.html)

https://www.contextures.com/calculatedfieldcalculateditem.html 8/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

(https://www.contextures.com/xlolxpt)

(/xlPivotPremAddIn.html)

https://www.contextures.com/calculatedfieldcalculateditem.html 9/10
7/24/2019 Excel Pivot Table Calculated Field or Calculated Item

Copyright © Contextures Inc. 2019

Privacy Policy (/privacy.html)

(https://mvp.microsoft.com/en-us/mvp/Debra%20%20Dalgleish-7612)Debra Dalgleish
(https://mvp.microsoft.com/en-us/mvp/Debra%20%20Dalgleish-7612)

Last updated: January 25, 2019 5:06 PM

https://www.contextures.com/calculatedfieldcalculateditem.html 10/10

You might also like