Ravindra BagaleCourses & study guides मराठी Track your progress

7. PivotTables and PivotCharts

7.6 Calculated Fields and Calculated Items

Calculated Field in a PivotTable with example — in 30 seconds

What: A Calculated Field is a new value field made from other fields, for example Amount after a 2% commission.

Why: You get the new number for every row of the pivot without touching the source data.

Tiny example: Net After Commission =Amount*0.98: Pune ₹544 becomes ₹533.12.

First look at the data (before → after):

Calculated Field in a PivotTable with example: before and after tables, fictional FreshGo Maharashtra data

Expected result — Pivot with the calculated field

Row Labels Sum of Amount Sum of Net After Commission
Nashik 360 352.80
Pune 544 533.12
Solapur 1,299 1,273.02

About this data: Teaching sample for a fictional shop “Pearl Textiles”. Figures and names (e.g. Aamir Khan) are made up for this lesson on calculated fields and calculated items.

Before table and formula as text

Before — Pivot: Sum of Amount (3 cities shown)

Row Labels Sum of Amount
Nashik 360
Pune 544
Solapur 1,299

About this data: Demo table only — not real customer or company data. Built to practise calculated fields and calculated items.

Formula / click path

PivotTable Analyze › Fields, Items, & Sets › Calculated Field…
Name: Net After Commission · Formula: =Amount*0.98

Do it step by step:

  1. Click inside the pivot.
  2. Click PivotTable Analyze › Fields, Items, & Sets › Calculated Field….
  3. Type the name Net After Commission.
  4. In Formula, type =Amount*0.98.
  5. Click Add, then OK. A new column appears in the pivot.
  • Calculated Field – a new value built from other fields: PivotTable Analyze › Calculations › Fields, Items, & Sets › Calculated Field…
  • Calculated Item – a new item inside a row/column field (e.g. "Pune + Nashik"): Fields, Items, & Sets › Calculated Item… (select an item of that field first).

Steps in Excel – commission and AOV

  1. Calculated Field… › Name Net After Commission › Formula =Amount*0.98 (fictional 2% payment commission) › Add › OK.
  2. For AOV, first add a column Order Count = 1 to tblOrders (each row = one order) and refresh.
  3. Calculated Field… › Name AOV › Formula =Amount/'Order Count' › OK. Format as ₹.

Important: a calculated field works on the sums of fields, not row by row. =Amount/'Order Count' = Sum of Amount ÷ Sum of Order Count – correct for AOV. But a formula like =Qty*Unit Price would multiply the sums, which is wrong – do row-level maths in the source Table instead.

Calculated items can't be used when the same field has grouped items, and they can make totals confusing; prefer grouping (7.5) where possible.

Ravindra Bagale's Tip

Many students think a calculated field works row by row, write =Qty*Price, and get a wrong, huge total. Remember: a calculated field works on the sums. Do row-level calculations in a calculated column in the Table, and use a calculated field for ratios (AOV, margin %).

Practice task

Add calculated fields Net After Commission and AOV (with an Order Count column). Compare AOV per city with a manual SUMIFS/COUNTIFS check.

Loading practice tasks...

  1. Total billable hours (Easy): Add up Billable hours in the "Billable hours" column.
  2. Average rate per hour (Easy): Average of the Rate per hour ($) column, rounded to 2 decimals.
  3. Rows in Cloud (Easy): How many rows have Practice "Cloud"?
  4. Largest billable hours (Easy): The largest value in the "Billable hours" column.
  5. Billable hours for Cloud (Medium): Total of the Billable hours column where Practice is "Cloud".
  6. Cloud in Chicago (Medium): Total of the Billable hours column where Practice is "Cloud" and City is "Chicago".
  7. Best in Cloud (Medium): Largest value in the "Rate per hour ($)" column where "Practice" is "Cloud".
  8. Value of row 2 (Medium): Multiply the first-row Billable hours by the first-row Rate per hour ($).
  9. Look up Sophie Martin (Medium): The Billable hours for "Sophie Martin" (use a lookup on the "Name" column).
  10. Total value (Hard): Sum of "Billable hours" times "Rate per hour ($)" for all rows.
  11. Share of Cloud (Hard): Share of the "Billable hours" column that is "Cloud", rounded to 3 decimals.
  12. Total "Billable hours" for SAP (Hard): Add up the "Billable hours" column for the rows where "Practice" is "SAP".
  13. Above average? (Hard): "Above" if the "Rate per hour ($)" value in the first row is above the average of the "Rate per hour ($)" column, else "Below".

Quick revision cards

Three standalone cards. Each one explains the idea with its own example. Scan the QR to open this lesson.

Revision card 1: What is Calculated Fields And Calculated Items?
Card 1: What is Calculated Fields And Calculated Items? · Download PNG
Revision card 2: Tiny example — Calculated Fields And Calculated Items
Card 2: Tiny example — Calculated Fields And Calculated Items · Download PNG
Revision card 3: Checklist — Calculated Fields And Calculated Items
Card 3: Checklist — Calculated Fields And Calculated Items · Download PNG