Skip to content
Educora
Advanced22 min19 / 27

PivotTables in depth

Grouping dates and numbers, shares and growth with Show Values As, calculated fields and their trap, slicers and timelines, PivotCharts and refreshing the right way.

Check yourself
In this lesson you will learn
  • Prepare the source data correctly for a PivotTable
  • Group dates, numbers and text items
  • Calculate shares, growth and margins with Show Values As and calculated fields
  • Build an interactive report with slicers, a timeline and a PivotChart

A sales log has collected 2,400 rows over two years: date, branch, product, revenue, cost. Management wants quarterly totals, each branch's share, month-on-month growth and the profit margin — as a report filtered with buttons. You learned the PivotTable basics earlier; now we move on to its professional tools.

Prepare the source

  • One header row with a unique name for every column; no blank rows or columns, no merged cells.
  • One data type per column: only real dates in the date column, only numbers in the amount column.
  • Turn the source into an Excel Table with Ctrl+T and name it (Table Design › Table Name: Sales) — new rows will be included automatically on refresh.
  • For a readable layout: Design › Layout › Report Layout › Show in Tabular Form and Repeat All Item Labels.

Grouping

  1. 1
    Dates by month, quarter and year

    Drag Date to Rows — Microsoft 365 often groups it by itself. Manually: right-click a date › Group… › select Months, Quarters, Years › OK.

  2. 2
    Numbers into bands

    Put Amount in Rows, right-click › Group… › Starting at 0, Ending at 3000, By 500. You get 0–499, 500–999… This shows how orders are distributed by size.

  3. 3
    Text items into your own group

    Select Baku and Sumgait with Ctrl, right-click › Group — “Group1” appears; rename it “Absheron”. To undo, use Ungroup.

Show Values As and calculated fields

Show Values As optionWhat it showsExample (Q1)
% of Grand Totaleach item's share of the grand totalBaku 52.3%, Ganja 31.9%, Sumgait 15.8%
Difference From (Base item: (previous))the change from the previous monthFeb +690, Mar +360
% Difference Frommonth-on-month growth in %Feb +34.5%, Mar +13.4%
Running Total Ina cumulative total2000 → 4690 → 7740
Rank Largest to Smallestthe rank (1 = largest)Baku 1, Ganja 2, Sumgait 3
Monthly revenue: Jan 2000, Feb 2690, Mar 3050 ₼. Path: right-click a value › Show Values As. Drag the same field into Values twice so that one copy shows the sum and the other the share.
  1. 1
    Create a calculated field

    PivotTable Analyze › Calculations › Fields, Items, & Sets › Calculated Field…. Name: Profit, Formula: =Revenue-Cost (add fields from the list with Insert Field) › Add.

  2. 2
    Add a margin

    In the same dialog add a second field: Margin = =Profit/Revenue. Give it a percentage format in Values (Value Field Settings › Number Format › Percentage).

Interactive
Loading simulation…
Revenue and cost by branch (in manat): profit and margin with PivotTable logic.
The calculated-field trap

The source has three rows for one product: price 10, quantity 5; price 12, quantity 3; price 11, quantity 4. You try to get revenue in the PivotTable with the calculated field =Price*Quantity. What comes out?

Show solution
Correct revenue is calculated row by row: 10 · 5 + 12 · 3 + 11 · 4 = 50 + 36 + 44 = ₼130.
The calculated field first takes the sums and then multiplies: (10 + 12 + 11) · (5 + 3 + 4) = 33 · 12 = ₼396 — more than three times too much!
Rule: a calculated field works on totals. That is right for ratios (Profit/Revenue) but wrong for row-by-row multiplication.
Fix: create a Revenue column in the source (=[@Price]*[@Quantity]) and sum it in the PivotTable like any field.

Slicers, timelines, PivotCharts and refresh

  1. 1
    Add a slicer

    PivotTable Analyze › Filter › Insert Slicer › tick Branch and Product. Clicking a button filters, Ctrl+click picks several items, and the funnel icon at the top right clears the filter.

  2. 2
    Add a timeline

    PivotTable Analyze › Filter › Insert Timeline › Date. Drag the bar to pick a period; switch between YEARS, QUARTERS, MONTHS and DAYS at the top right.

  3. 3
    One slicer — several reports

    Select the slicer › Slicer › Slicer › Report Connections › tick every PivotTable built on the same source. Now one click filters the whole dashboard.

  4. 4
    Build a PivotChart

    PivotTable Analyze › Tools › PivotChart (or Alt+F1 inside the PivotTable). The chart obeys the same filters; hide the field buttons with PivotChart Analyze › Show/Hide › Field Buttons.

Group the selected PivotTable itemsAlt+Shift+→
UngroupAlt+Shift+←
Refresh the active PivotTableAlt+F5
Refresh everything (Refresh All)Ctrl+Alt+F5
An instant PivotChart from the PivotTableAlt+F1

Key points

  • The source should be an Excel Table with one header row and no gaps; new rows are included on refresh.
  • You can group dates by month/quarter/year, numbers into bands and text into your own groups.
  • Show Values As gives shares, differences, % growth, running totals and ranks.
  • A calculated field works on totals: good for ratios, wrong for row-by-row multiplication.
  • Slicers and timelines filter with buttons; Report Connections links them to several PivotTables.

Check yourself

10 questions. Every correct answer earns XP.

1 / 10
Monthly revenue: Jan 2000, Feb 2690. What does % Difference From (previous) show for Feb?