⚡0 XP🔥0

Pivot Tables, Pivot Charts and Slicers

Lesson 5 of 7 ⏱ 5 min read ❓ 5-question quiz

Summarise thousands of rows in seconds - build pivot tables, group dates, show values as % of total, use calculated fields, slicers and timelines, and choose the right chart for each message.

What is a pivot table?#

A pivot table summarises a large table by grouping and aggregating - without writing formulas. In 30 seconds it answers questions like "total sales by region and year" or "average discount by category".

हिंदी में समझें

Pivot Table Excel का सबसे ताकतवर analysis tool है। हज़ारों rows को drag-and-drop करके कुछ ही सेकंड में summary बना देता है - बिना कोई formula लिखे।

चार हिस्से याद रखें:

  • Rows - किस आधार पर group करें (जैसे region)
  • Columns - दूसरा आधार (जैसे year)
  • Values - क्या जोड़ना/गिनना है (जैसे sales का sum)
  • Filters - किस data को देखना है (जैसे सिर्फ Technology)

Creating a pivot table#

  1. Click inside tblSales.
  2. Insert → PivotTable → New Worksheet → OK.
  3. In the PivotTable Fields pane, drag fields into the four areas:
Area Purpose Example
Rows groups down the side region
Columns groups across the top year
Values numbers to aggregate Sum of sales
Filters filter the whole pivot category

Result:

Sum of sales 2024 2025 Grand Total
Central 8,31,835 8,58,346 16,90,182
East 5,25,428 10,48,469 15,73,897
North 14,57,510 12,24,915 26,82,424
South 14,21,553 10,37,129 24,58,682
West 14,38,593 12,22,677 26,61,270
Grand Total 56,74,919 53,91,536 1,10,66,455

Insight in one glance: East doubled from 2024 to 2025, while North, South and West declined.

Working with values#

  • Change the summary: click the value field → Value Field Settings → Sum, Count, Average, Max, Min, Distinct Count (needs the Data Model checkbox).
  • Number format: Value Field Settings → Number Format (thousand separators).
  • Several values: drag sales, profit and order_id (Count) into Values together.

Show Values As#

Value Field Settings → Show Values As:

Option Answers
% of Grand Total each region's share of all sales
% of Column Total share within each year
% Difference From (previous year) year-on-year growth
Running Total In (month) cumulative sales through the year
Rank Largest to Smallest ranking of products

Grouping#

  • Dates: put order_date in Rows → right-click → Group → tick Years and Months (and Quarters if needed).
  • Numbers: put sales in Rows → Group → starting at 0, by 5000 → creates order-size bands (a histogram table).
  • Text items: select several items → right-click → Group (e.g. combine small cities into "Others").

Calculated fields#

PivotTable Analyze → Fields, Items & Sets → Calculated Field:

Name:    Margin %
Formula: = profit / sales

It's calculated on the totals of each group (correct for ratios). Format as percentage.

Common Mistake

Don't average a margin % column - that gives each order equal weight. A margin for a group must be total profit ÷ total sales, which is exactly what a calculated field does.

Sorting, filtering, top N#

  • Sort by value: right-click a value → Sort → Largest to Smallest.
  • Top 10: Row Labels drop-down → Value Filters → Top 10 → choose 5, 10...
  • Label filters: contains, begins with...

Slicers and timelines#

PivotTable Analyze → Insert Slicer → tick region, category, segment. Click the buttons to filter instantly (Ctrl+click for several).

Insert Timeline → order_date - a sliding date filter by year, quarter or month.

To make one slicer control several pivots: right-click the slicer → Report Connections → tick the pivots (they must use the same source).

Pivot charts and choosing the right chart#

PivotTable Analyze → PivotChart. The chart updates with the pivot and slicers.

Message Best chart
Trend over time Line
Compare categories Column / bar (bar for long names)
Part of a whole (2-5 parts) Pie / donut - or better, a 100% stacked bar
Two-level comparison (region × year) Clustered column
Relationship between two numbers Scatter
Contribution adding up to a total Waterfall
Target vs actual Bullet / column with target line
Tip

Chart hygiene: clear title that states the insight ("East sales doubled in 2025"), sorted bars, minimal gridlines, data labels only where useful, consistent colours for the same category across charts.

Refresh#

Pivots store a snapshot. After the source changes: right-click → Refresh or Data → Refresh All (Ctrl + Alt + F5). Because the source is a Table, new rows are included automatically.

Practice (Sales sheet)#

Build pivots to answer:

1. Profit by category - which category earns the most profit, and which has the best margin?

Profit: Furniture Rs. 6,88,746, Technology Rs. 6,39,742, Office Supplies Rs. 1,73,564. Margin (calculated field): Office Supplies 37.5%, Furniture 23.8%, Technology only 8.3%. Technology has 70% of sales but the thinnest margin.

2. Top 3 products by profit?
  1. Green Soul Ergonomic Chair - Rs. 2,31,724
  2. 5-Shelf Bookcase - Rs. 1,37,259
  3. boAt Wireless Earbuds - Rs. 1,29,649

(The top products by sales are laptops and phones - high revenue doesn't mean high profit!)

3. Group order_date by month for 2025 - which month had the highest sales?

January 2025 (Rs. 7,02,480), followed by October (Rs. 6,43,964) and November (Rs. 6,34,237). May 2025 was the weakest (Rs. 1,83,280).

4. Each segment's % of grand total sales?

Consumer 50.5%, Corporate 30.2%, Small Business 19.3%.

5. Sum of profit by discount - which discount levels lose money?

0%: +9,74,422 · 5%: +2,91,770 · 10%: +2,33,053 · 15%: +48,578 · 20%: +477 · 30%: -46,248. Profit collapses above 15% and turns negative at 30%.

Summary#

  • Pivot tables summarise data with Rows, Columns, Values and Filters - no formulas needed.
  • Use Show Values As for shares, growth and rankings; group dates and numbers; add calculated fields for ratios.
  • Slicers and timelines make reports interactive; pivot charts update with them.
  • Choose charts by message: line for trends, bars for comparisons, scatter for relationships.
  • Refresh after data changes.

Quick Quiz

Q1.

In a pivot table, where do you put a field to total its numbers?

Q2.

You add new rows to the source data (an Excel Table). What must you do so the pivot includes them?

Q3.

Which option shows each region's share of total sales?

Q4.

Which chart is best to show monthly sales over two years?

Q5.

What do slicers do?