Your first pivot table in Excel or Google Sheets, step by step
Build a sales-by-branch summary with no formulas, then improve it with four quick changes.
A pivot table sounds technical, and many people avoid it for years. In fact it is the easiest powerful tool in a spreadsheet: no formulas, only dragging. If you can drag a file into a folder, you can build one. Here is how, in Excel and Google Sheets.
What it does
A pivot table summarises a long list. Give it 24 invoices or 24,000 and it answers questions like "sales by branch", "sales by branch by month" or "number of bills per salesperson" in seconds. Change the question and you rearrange it in seconds again.
Get the data ready
- One header row, with a clear name for every column.
- No blank rows or blank columns in the middle.
- No merged cells.
- One kind of data per column: amounts are numbers, dates are real dates.
Build it in Excel
- Click any one cell inside your data.
- Choose Insert, PivotTable, New Worksheet, OK.
- In the field list on the right, drag Branch to Rows.
- Drag Amount to Values. It shows Sum of Amount.
- Drag Month to Columns for a branch-by-month grid.
Build it in Google Sheets
- Click any cell in the data.
- Choose Insert, Pivot table, New sheet, Create.
- In the editor, add Branch under Rows, Amount under Values and Month under Columns.
Check it
The grand total of the pivot table should equal a simple SUM of the Amount column. If it does not, part of the data was left out of the range, or some amounts are stored as text.
Four quick improvements
- Count instead of sum: open Value Field Settings and choose Count to see the number of invoices.
- Share of total: Show Values As, % of Grand Total, to see each branch's share.
- Group dates: with real dates, right-click a date and group by month or quarter.
- See the rows behind a number: in Excel, double-click any value and a new sheet lists the invoices that make it up.
Common surprises
Months show in alphabetical order, so Apr, Jun, May, when the month column is text. Drag the heading into place or use real dates and group them. The pivot does not change when you add data, because Excel pivots need a refresh: right-click and choose Refresh. Google Sheets updates by itself. And if the same branch appears twice, as Pune and pune, the data has a spelling problem; a dropdown on that column fixes it for good.
Then add a chart
Click inside the pivot table and insert a column chart. Give it a title that states the point, not "Chart 1". The Sheetsprint guide builds this pivot and chart in its fifth sprint, on practice data with the exact totals you should see.