top of page

You are learning PivotTables in MS Excel

How to create calculated fields and items in a PivotTable?

Creating Calculated Fields in PivotTables:

1. Accessing the Feature:

* Click anywhere within your PivotTable to activate the PivotTable Tools on the ribbon.
* Navigate to the Analyze tab.
* In the Calculations group, click on Fields, Items, & Sets.
* Select Calculated Field.

2. Building the Formula:

* A dialog box will appear for you to define your calculated field.
* Enter a descriptive Name for the field (e.g., "Profit Margin").
* In the Formula box, you can:
* Use cell references from your source data.
* Utilize basic mathematical operators (+, -, *, /).
* Include Excel functions like SUM, AVERAGE, COUNTIF, etc.
* Click Add to add the calculated field to your PivotTable.

3. Using the Calculated Field:

* The newly created field will appear in the Fields list.
* You can drag and drop it into your Rows, Columns, Values, or Filters sections of the PivotTable to display the calculated results.

Creating Calculated Items in PivotTables:

1. Identifying the Scenario:

Calculated items are typically used when you want to group existing items within a field based on a specific formula.

2. Accessing the Feature:

* Similar to creating calculated fields, click anywhere in the PivotTable and go to the Analyze tab.
* In the Calculations group, click on Fields, Items, & Sets.
* This time, select Calculated Item.

3. Building the Formula:

* Choose the Field from which you want to create a calculated item (e.g., Product Category).
* Enter a clear Name for the calculated item (e.g., "High Profit Products").
* In the Formula box, build a formula using the existing item names or cell references to define the grouping criteria.
* You can use logical operators (AND, OR) to create complex conditions.
* Click Add to include the calculated item within that specific field.

4. Using the Calculated Item:

* The calculated item will be displayed indented under the original field in the Fields list.
* You can then use it like any other item within that field for rows, columns, filters, etc.

By using calculated fields and items, you can extend the analytical capabilities of your PivotTables and create custom calculations or groupings specific to your data analysis needs.

bottom of page