← Learning Hub
Advanced

Pivot Tables in Depth

A pivot table summarises thousands of rows in seconds: totals by month, by region, by product - and you change the view by dragging fields.

Pivot tables let you ask a question of your data and see the answer instantly, then ask a different question by dragging a field. Managers use them to explore sales by month, region and product; accountants to summarise ledgers; HR to count staff by department. Slicers turn a pivot table into a simple, clickable dashboard.

Build one

  • Click inside your Table and choose Insert → PivotTable → New Worksheet.
  • Drag Region to Rows, Product to Columns and Amount to Values.
  • Drag Date to Rows: Excel groups it by Years, Quarters and Months. Right-click a date → Group to change this.

Change how values are shown

  • Right-click a value → Summarize Values By: Sum, Count, Average, Max.
  • Right-click → Show Values As: % of Grand Total, % of Column Total, Difference From (this month vs last month), Running Total.
  • Right-click → Value Field Settings → Number Format to show ₹ and commas.

Slicers and timelines

PivotTable Analyze → Insert Slicer adds big filter buttons (for Region, Product). Insert Timeline adds a date slider. One slicer can control several pivot tables: right-click it → Report Connections.

Calculated fields and refreshing

Example
PivotTable Analyze → Fields, Items & Sets → Calculated Field
Name:    GST
Formula: = Amount * 0.18
  • Pivot tables do not update by themselves. After changing the data, press Refresh (or Alt + F5).
  • Because your source is a Table, new rows are included when you refresh.
  • Add a PivotChart from the same menu for a chart that follows your filters.
Example
=GETPIVOTDATA("Amount", $A$3, "Region", "North")    → pulls one number out of a pivot table
Keep raw data in one long table: one row per sale, one column per field, no blank rows or merged cells. Pivot tables (and Power Query) love that shape.
Key points
  • Drag fields into Rows, Columns, Values and Filters.
  • Show Values As gives percentages and running totals.
  • Slicers and timelines make interactive filters.
  • Refresh after the data changes.

📝 Test yourself

1. Which setting shows each region's share of all sales?
2. What do you do after the source data changes?
3. Fill in the tool that adds clickable filter buttons to a pivot table:
Insert