- 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+Tand 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 FormandRepeat All Item Labels.
Grouping
- 1Dates by month, quarter and year
Drag
DatetoRows— Microsoft 365 often groups it by itself. Manually: right-click a date ›Group…› selectMonths,Quarters,Years›OK. - 2Numbers into bands
Put
AmountinRows, right-click ›Group…›Starting at0,Ending at3000,By500. You get 0–499, 500–999… This shows how orders are distributed by size. - 3Text items into your own group
Select Baku and Sumgait with
Ctrl, right-click ›Group— “Group1” appears; rename it “Absheron”. To undo, useUngroup.
Show Values As and calculated fields
Show Values As option | What it shows | Example (Q1) |
|---|---|---|
% of Grand Total | each item's share of the grand total | Baku 52.3%, Ganja 31.9%, Sumgait 15.8% |
Difference From (Base item: (previous)) | the change from the previous month | Feb +690, Mar +360 |
% Difference From | month-on-month growth in % | Feb +34.5%, Mar +13.4% |
Running Total In | a cumulative total | 2000 → 4690 → 7740 |
Rank Largest to Smallest | the rank (1 = largest) | Baku 1, Ganja 2, Sumgait 3 |
Show Values As. Drag the same field into Values twice so that one copy shows the sum and the other the share.- 1Create a calculated field
PivotTable Analyze › Calculations › Fields, Items, & Sets › Calculated Field….Name:Profit,Formula:=Revenue-Cost(add fields from the list withInsert Field) ›Add. - 2Add a margin
In the same dialog add a second field:
Margin==Profit/Revenue. Give it a percentage format inValues(Value Field Settings › Number Format › Percentage).
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 solutionHide solution
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
- 1Add a slicer
PivotTable Analyze › Filter › Insert Slicer› tickBranchandProduct. Clicking a button filters,Ctrl+click picks several items, and the funnel icon at the top right clears the filter. - 2Add a timeline
PivotTable Analyze › Filter › Insert Timeline›Date. Drag the bar to pick a period; switch betweenYEARS,QUARTERS,MONTHSandDAYSat the top right. - 3One 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. - 4Build a PivotChart
PivotTable Analyze › Tools › PivotChart(orAlt+F1inside the PivotTable). The chart obeys the same filters; hide the field buttons withPivotChart Analyze › Show/Hide › Field Buttons.
Refresh All)Ctrl+Alt+F5Key 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 Asgives 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 Connectionslinks them to several PivotTables.
Check yourself
10 questions. Every correct answer earns XP.
% Difference From (previous) show for Feb?