What is a pivot table?
A pivot table is a summary calculated from a list. It groups the rows that share a value, sums, counts or averages them, and crosses two dimensions, without ever changing the source.
The table is a grid of totals, not a list: each cell sits at the intersection of an item in the rows and an item in the columns, Hand tools in the North for example. And it “pivots”: you change the point of view by moving a field.
A common misconception is that a pivot table updates itself. It does not. Excel keeps a copy of the data in memory, which Microsoft calls the cache, and the pivot table does not change until you refresh it.
Another frequent mix-up: an Excel table holds the data, a pivot table summarizes it. The right setup is an Excel table as the source (the list formatted with Home > Format as Table), with a pivot table on top.
Four words are enough to follow the method:
| Term | What it is | In the example |
|---|---|---|
| Source | The starting list: one row per event, one column per piece of information, a single header row. | 120 sales rows from the first half of 2026. |
| Field | A column of the source, named by its header. | Date, Category, Region, Sales rep, Quantity, Unit price, Amount. |
| Item | A distinct value of a field; each one becomes a row or a column of the pivot table. | East, North, South and West, the four items of the Region field. |
| Area | Where you drop a field: Filters, Columns, Rows or Values. | Category in Rows, Region in Columns, Amount in Values. |
The small business in our example is fictional: four product categories, four regions, five sales reps, twenty sales a month. The move from the list to the pivot table fits in one picture.
What is it for in a small business?
To answer, in a few minutes, a “how much by what” question nobody planned for. For example: revenue by customer from the sales journal, expenses by account from the general ledger or the FEC (France’s standard audit file), hours by job from the time clock.
One Monday, the CEO asks for first-half revenue by category and region, then, in the meeting: “And by sales rep?” With twenty-five SUMIFS formulas (a conditional sum, written cell by cell), everything has to be rewritten; with a pivot table, you move a field.
What a pivot table cannot do is clean up a messy export, combine twelve monthly files or make sure the whole leadership team reads the same version. Each of those limits has its own tool, covered at the end of this article.
To chart it: PivotTable Analyze > PivotChart. The chart follows the pivot table’s filters and slicers (button filters).
Excel for Microsoft 365 also has PIVOTBY, a function that produces a similar summary. Microsoft points out that it is not linked to pivot tables: no field list, no slicers.
How do you create a pivot table in Excel?
In three steps: format the source as a table, click Insert > PivotTable, then drag one field to Rows, one to Columns and a number to Values. Everything else (calculation, dates, filters) is set afterward.
Menu names are those of Excel for Microsoft 365 for Windows, in English; Excel 2016 through 2024 work the same way.
- Prepare the source. One row per sale, a single header row, no merged cells, no blank rows, no total rows. Click in the list, then Home > Format as Table (Ctrl+T), with “My table has headers” checked. Microsoft recommends formatting the source as an Excel table.
- Insert the pivot table. Insert > PivotTable, keep New Worksheet and click OK. The PivotTable Fields pane opens on the right.
- Place the fields. Category in Rows, Region in Columns, Amount in Values. If you simply check the boxes, Excel puts text fields in Rows, dates and times in Columns, and numbers in Values by default.
- Choose the calculation. In Values, click the field’s arrow > Value Field Settings. “Summarize Values By” offers Sum, Count, Average, Max, Min; the “Show Values As” tab offers percentages of the grand total, row total or column total.
- Group the dates. Drag Date to Rows: Excel often groups it automatically. Otherwise, right-click a date > Group > Months, and Years too if the source spans several.
- Add a slicer. Insert > Slicer, check Sales rep: a button filter. Slicer tab > Report Connections makes it filter several pivot tables built on the same source.
- Refresh. Right-click > Refresh, or Alt+F5; for the whole workbook, Refresh All (Ctrl+Alt+F5). In PivotTable Options, Data tab, check “Refresh data when opening the file.”
The PivotTable Fields pane is where it all happens.
The Values area shows “Sum of Amount.” If it showed “Count of Amount,” the column would have been read as text (mistake no. 3).
The expected result, and five changes to understand it
To try it yourself, download the 120 sales rows (CSV): comma-separated, dates in year-month-day format, made-up data. Here is the answer key:
| Sum of Amount (€ excl. VAT) | East | North | South | West | Grand Total |
|---|---|---|---|---|---|
| Electrical | 7,620 | 6,360 | 5,880 | 5,100 | 24,960 |
| Hand tools | 2,880 | 12,780 | 7,920 | 7,200 | 30,780 |
| Paint | 4,230 | 12,420 | 4,545 | 5,535 | 26,730 |
| Supplies | 8,575 | 10,650 | 5,625 | 3,600 | 28,450 |
| Grand Total | 23,305 | 42,210 | 23,970 | 21,435 | 110,920 |
Starting from this table, five changes show most of what a pivot table can do:
| You change | The table shows | The takeaway |
|---|---|---|
| Months in Columns | Each category’s sales, January to June | The same source answers another question: that is what “pivot” means. |
| Sum → Count | A grand total of 120 | Excel counts sales rows, not quantities. |
| Show Values As > % of Grand Total | Hand tools at 27.7% | €30,780 out of €110,920, from 30 rows out of 120. |
| Sales rep in Rows | 15 empty cells out of 20 | Each rep sells in a single region: an empty cell means “no rows,” not “zero.” |
| Sum → Average | €924.33 in the grand total | That is €110,920 ÷ 120 rows. The average of the four category averages would give €936.82: Excel does the right calculation; the error creeps in when you redo it by hand. |
Windows, Mac, browser: what changes
| Action | Excel for Windows | Excel for Mac |
|---|---|---|
| Create an Excel table | Ctrl+T, or Home > Format as Table | Cmd+T or Ctrl+T |
| Insert a pivot table | Insert > PivotTable | The same path |
| Refresh the pivot table | Alt+F5, or right-click > Refresh | Ctrl+click > Refresh |
| Refresh the whole workbook | Ctrl+Alt+F5 | PivotTable Analyze tab, Refresh arrow |
| Select several slicer buttons | Ctrl+click | Cmd+click |
| Link two tables | Data > Relationships | Not documented: Microsoft only mentions Windows |
Excel for the web follows the same path. The automatic refresh Microsoft has announced is still limited, as of November 2026, to the Microsoft 365 Insider program. Copilot can create a pivot table from a sentence: check the range it picked (see AI in Excel).
How do you link two Excel tables in a pivot table?
With a relationship in Excel’s Data Model, not with VLOOKUP: you declare that two tables share a column, and the pivot table reads both without copying anything.
VLOOKUP is fine for describing a row: the customer’s industry, the account name. It backfires as soon as you bring in a number from a different level of detail.
Let’s give our small business a second, four-row table: the half-year target by category, €110,000 in total. Copied onto every sale, the target is then added up as many times as there are rows.
Revenue stays correct in both cases, which makes the error believable. Microsoft sums up the benefit of a relationship: unlike lookup formulas, it does not duplicate data.
The method, applied to sales and targets
- Two named Excel tables: Sales and Targets.
- A shared column, unique on one side: Category appears once in Targets and repeats in Sales. Excel won’t create the relationship if both columns contain duplicates.
- The relationship: Data > Relationships > New. Table: Sales, with Column (Foreign): Category, the side where it repeats; Related Table: Targets, with Related Column (Primary): Category, the side where it is unique. If the Relationships button is grayed out, the workbook contains only one table.
- The pivot table on the model: Insert > PivotTable, checking “Add this data to the Data Model.” The field list shows both tables.
- Category from the correct table: in Rows, Category from the Targets table; in Values, Target and Amount. Shown by month or by sales rep, the target would repeat, since it does not exist at that level.
- The rate as a measure. With the Data Model as the source, the Calculated Field command is unavailable. Microsoft rules it out for OLAP sources (databases designed for analysis), and the Data Model is one.
You need an explicit measure: a named formula written in DAX, the language of Power Pivot (an Excel for Windows add-in you have to enable) and of Power BI. Power Pivot tab > Calculations > Measures > New Measure, Table name: Sales, then the formula.
Attainment :=
DIVIDE (
SUM ( Sales[Amount] ),
SUM ( Targets[Target] )
)The measure shows 100.8% for the grand total, 102.6% for Hand tools, 95.5% for Paint. Dragging a field into Values would only have created an implicit measure: sum, count, average, minimum, maximum or distinct count.
In the dialog, type only what follows the equals sign, with semicolons instead of commas if your regional settings require them. DIVIDE leaves the cell blank when a target is zero, instead of returning an error.
Power Pivot, the bridge to Power BI
Power Pivot tab > Manage, Diagram View: each relationship appears as a line marked “1” on one side and “*” on the other. This Excel for Windows add-in is turned on under COM Add-ins.
Microsoft says so plainly: this model uses Power BI technology. This star schema carries over as is into a Power BI data model, with the same language (DAX in Power BI).
How do you compare, present and reuse a pivot table?
Three settings cover most needs: Show Values As to compare two periods, tabular form to get a real list, and GETPIVOTDATA to pull a number into another cell.
Compare with the previous period (year over year)
Drag Amount into Values twice. On the second one, open Value Field Settings > Show Values As. Choose “Difference From” (the variance in euros) or “% Difference From,” base field Years, base item “(previous).”
“% Of,” by contrast, shows the value as a percentage of the base: 110% instead of +10%.
The sample data covers only one half-year, but the steps are the same with Months as the base field. February then shows +€4,060 (€21,100 versus €17,040 in January), or +23.8%, and January stays empty, since it has no previous month.
Compare complete periods: a month that is still open, set against the same closed month last year, shows a drop that is not real.
A reusable layout: tabular form
By default, Excel uses compact form: all row fields stack in one indented column, readable on screen but useless once copied, and impossible to query with XLOOKUP.
Design tab > Report Layout > Show in Tabular Form: each field gets its own column. Add “Repeat All Item Labels” and Subtotals > “Do Not Show Subtotals”: the pivot table becomes a list, one row per combination.
For a plain, static table with no link to the source: select the entire pivot table, copy it (Ctrl+C), then Home > Paste > Paste Special > Values.
Pull a number elsewhere: GETPIVOTDATA
Type = and click a cell in a pivot table: instead of =B5, Excel writes GETPIVOTDATA, which identifies the number by its field and item. Syntax: the value field in quotes, a cell in the pivot table, then up to 126 field and item pairs.
=GETPIVOTDATA(
"Amount",$A$3,
"Category","Hand tools")
→ €30,780
=GETPIVOTDATA(
"Amount",$A$3)
→ €110,920Sort, add a category, move a field: as long as Hand tools is displayed, the formula finds it. It is the right building block for an Excel dashboard laid out next to the pivot table.
Two pitfalls. The function only reads what is displayed: filter out Hand tools and the cell turns into an error (#REF!).
Copied down, it does not shift from one category to the next, since “Hand tools” is hard-coded. Replace it with a reference ("Category",A12), or uncheck “Generate GetPivotData” under PivotTable Analyze > Options.
Why does a pivot table show the wrong total?
Most often because the source is poorly built, and none of these mistakes triggers a warning: the pivot table shows a plausible total, right or wrong. Of the seven common mistakes below, five come from the source; in the example, the correct total is €110,920.
| Mistake | What the example shows | Fix |
|---|---|---|
| 1. Merged or blank cells in the source | A Region merged across ten rows: nine sales under a blank label, because a merge keeps only one cell’s content. | Unmerge, repeat the value on every row, remove blank rows and subtotals. |
| 2. A fixed range that does not grow | Built at the end of May on the first 100 rows: €91,255 at the end of June, even after a refresh. June’s €19,665 is missing. | Use an Excel table as the source; otherwise, Change Data Source in PivotTable Analyze, Data group. |
| 3. Numbers stored as text | 120 instead of €110,920: the header becomes “Count of Amount.” | Error indicator > Convert to Number, or VALUE; refresh, switch back to Sum. |
| 4. Dates stored as text | Grouping by month is impossible. | DATEVALUE, paste as values, date format; never mix dates and text in one column. |
| 5. Forgetting to refresh | The corrected sale keeps its old amount. | Alt+F5 before reading the numbers, refresh on open, last refresh date noted next to the table. |
| 6. A calculated field assumed to work row by row | €923,400 for Hand tools instead of €30,780. | Calculate the amount in the source; keep calculated fields for ratios between two sums. |
| 7. A target copied with VLOOKUP | A €3,312,000 target instead of €110,000. | Keep targets in their own table and link them to sales (link two tables). |
If the export arrives every month with merged cells, title rows or text dates, record the cleanup once in Power Query.
The least intuitive mistake: the calculated field
A calculated field (PivotTable Analyze > Fields, Items, & Sets > Calculated Field) does not work row by row. Microsoft is explicit: its formula applies to the sum of the fields it references. So the formula = Quantity * 'Unit price' multiplies the sum of quantities by the sum of unit prices.
Its grand total, €21,079,710, is not even the sum of its four rows (€3,348,540): it is recalculated from the sums of the whole source.
A calculated field still works for a ratio between two sums, such as an average price (= Amount / Quantity). Microsoft adds that it cannot refer to a total.
The one-minute check
Before you share a pivot table, compare its grand total with a number you know from another source. The column total in the source, revenue from the trial balance or the export’s total will do. If they differ, one of the seven mistakes is at work.
What are Excel’s limits for a pivot table?
The limit that matters is 1,048,576 rows per worksheet. The Data Model lifts it, with up to 1,999,999,997 rows per table, but shifts the constraint to the computer’s memory.
Limits published for Excel for Microsoft 365 (the worksheet limits also apply to 2016 through 2024):
| Limit | Value published by Microsoft |
|---|---|
| Rows and columns in a worksheet | 1,048,576 rows, 16,384 columns |
| Unique items per field | 1,048,576 |
| Value fields per pivot table | 256 |
| Report filters | 256, fewer if memory runs short |
| Row or column fields | Limited by available memory |
| Items displayed in a filter dropdown list | 10,000 |
| Rows per Data Model table | 1,999,999,997 |
| Memory for a workbook with a Data Model | 32-bit: 2 GB of address space, shared with Excel and add-ins; 64-bit: the computer’s memory |
| Workbook with a Data Model in Excel for the web | 250 MB in total |
To check whether your Excel is 32-bit or 64-bit: File > Account > About Excel. A detailed general ledger or several years of invoice lines can exceed a worksheet.
These are maximums, not comfortable working limits: Microsoft does not say when a workbook becomes slow. The real limit is not technical: as soon as several people work on the file, several versions circulate.
Pivot table, Power Query or Power BI: which should you use?
A one-off question about one file: a pivot table is enough. Exports to clean up or combine every month: add Power Query. Several readers and a single version of the numbers: that is Power BI territory.
These tools do not compete; they stack: Power Query prepares, the Data Model connects, the pivot table summarizes, and Power BI takes over all three to share the result.
| Your situation | The tool that is enough | Why |
|---|---|---|
| A one-off question about a single export | A pivot table, on its own | Ten minutes, no project, no extra license. |
| The same analysis every month, export pasted in the same place | An Excel table, a pivot table on top, Refresh | The source grows; groupings and slicers stay in place. |
| Several files to stack, exports to clean | Power Query, then the pivot table | The cleanup is recorded once and replayed on every refresh; Data > Get Data > From File > From Folder stacks the monthly files. |
| Two lists to match: sales and targets, journal entries and chart of accounts | The Data Model (relationships), then the pivot table | Each table keeps its level of detail: no VLOOKUP, no double counting. |
| More than a million rows | Power Query and the Data Model, without going through a worksheet | A worksheet stops at 1,048,576 rows; the model does not. |
| Several readers, one version, updates without anyone stepping in, permissions per person | Power BI | A workbook sent by email solves none of these four needs (Power BI vs Excel). |
The signal to move up a level is rarely technical: it is the time spent every month rebuilding the same workbook. As long as that stays one person’s job, Power Query and an Excel dashboard are enough. Beyond that, our guide to automated reporting shows what the switch changes and what it costs; to learn on your own, see Power BI training.
Power BI does not make pivot tables obsolete: Excel’s PivotTable button can start from an organization’s Power BI semantic model and read its official numbers.
Back to that Monday: “And by sales rep?” now takes a single field drag. When the question comes back every week from ten readers, what you need is no longer a pivot table but a report.
Frequently asked questions
How do I show the PivotTable field list?
Click anywhere in the pivot table: the field list appears on the right. If it was closed, go to the PivotTable Analyze tab (Analyze in some versions) and click Field List.
How do I move a pivot table?
Click in the pivot table, then PivotTable Analyze > Move PivotTable. Choose New Worksheet or Existing Worksheet, and enter the first destination cell.
How do I delete a pivot table?
Click in the pivot table, press Ctrl+A, then Delete. Without the shortcut: PivotTable Analyze > Select > Entire PivotTable, then Delete.
How do I format a pivot table?
Click in the pivot table, then the Design tab: pick a style from the gallery, check Banded Rows and set the Report Layout; tabular form gives one column per field. Set number formats in Value Field Settings > Number Format rather than cell by cell.
Does Google Sheets have pivot tables?
Yes: select the data, then Insert > Pivot table. The logic is the same (rows, columns, values, filters); according to Google, the pivot table updates on its own whenever the source changes. The Data Model, Power Pivot and Power Query are Excel-only.
