Excel pivot tables: how to create one, the mistakes to avoid, the limits

Published · Updated · 14 min read

Dylan Arnaud, founder of Datafuji

A pivot table (PivotTable in Microsoft’s spelling) is an Excel tool that summarizes a long list by several criteria at once, with no formulas and without changing the source data. You create one with Insert > PivotTable and three field drags, but it works on a copy of the data: every time the source changes, you have to refresh it (Alt+F5).

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:

TermWhat it isIn the example
SourceThe 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.
FieldA column of the source, named by its header.Date, Category, Region, Sales rep, Quantity, Unit price, Amount.
ItemA 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.
AreaWhere 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.

On the left, the first rows of the source: 120 sales from January 4 to June 28, 2026, seven columns in all (date, category, region, sales rep, quantity, unit price, amount); the Category, Region and Amount columns, the only ones used, are shaded gray. On the right, the resulting pivot table: the four categories in rows, the four regions in columns, the sum of amounts in each cell, and a grand total of €110,920. The Hand tools cell for the North, €12,780, is outlined in blue, as are the amounts €180, €180 and €1,800 in the source: it adds up every Hand tools sale made in the North.On the left, the first rows of the source: 120 sales from January 4 to June 28, 2026, seven columns in all (date, category, region, sales rep, quantity, unit price, amount); the Category, Region and Amount columns, the only ones used, are shaded gray. On the right, the resulting pivot table: the four categories in rows, the four regions in columns, the sum of amounts in each cell, and a grand total of €110,920. The Hand tools cell for the North, €12,780, is outlined in blue, as are the amounts €180, €180 and €1,800 in the source: it adds up every Hand tools sale made in the North.
Three fields are enough: Category in rows, Region in columns, Amount in values.

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.

  1. 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.
  2. Insert the pivot table. Insert > PivotTable, keep New Worksheet and click OK. The PivotTable Fields pane opens on the right.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.

Diagram of Excel’s PivotTable Fields pane. At the top or on the left, the seven fields of the source: Date, Category, Region, Sales rep, Quantity, Unit price and Amount; only Category, Region and Amount are checked. Below or on the right, the four areas laid out in a square as in Excel: Filters, empty; Columns, holding Region, one item per column; Rows, holding Category, one item per row; Values, holding “Sum of Amount,” the calculation.Diagram of Excel’s PivotTable Fields pane. At the top or on the left, the seven fields of the source: Date, Category, Region, Sales rep, Quantity, Unit price and Amount; only Category, Region and Amount are checked. Below or on the right, the four areas laid out in a square as in Excel: Filters, empty; Columns, holding Region, one item per column; Rows, holding Category, one item per row; Values, holding “Sum of Amount,” the calculation.
Four areas, three fields placed: that is all it takes to build the example table.

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)EastNorthSouthWestGrand Total
Electrical7,6206,3605,8805,10024,960
Hand tools2,88012,7807,9207,20030,780
Paint4,23012,4204,5455,53526,730
Supplies8,57510,6505,6253,60028,450
Grand Total23,30542,21023,97021,435110,920

Starting from this table, five changes show most of what a pivot table can do:

You changeThe table showsThe takeaway
Months in ColumnsEach category’s sales, January to JuneThe same source answers another question: that is what “pivot” means.
Sum → CountA grand total of 120Excel counts sales rows, not quantities.
Show Values As > % of Grand TotalHand tools at 27.7%€30,780 out of €110,920, from 30 rows out of 120.
Sales rep in Rows15 empty cells out of 20Each rep sells in a single region: an empty cell means “no rows,” not “zero.”
Sum → Average€924.33 in the grand totalThat 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

ActionExcel for WindowsExcel for Mac
Create an Excel tableCtrl+T, or Home > Format as TableCmd+T or Ctrl+T
Insert a pivot tableInsert > PivotTableThe same path
Refresh the pivot tableAlt+F5, or right-click > RefreshCtrl+click > Refresh
Refresh the whole workbookCtrl+Alt+F5PivotTable Analyze tab, Refresh arrow
Select several slicer buttonsCtrl+clickCmd+click
Link two tablesData > RelationshipsNot 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.

Two setups. On the left, marked wrong: each category’s target is copied by VLOOKUP onto every one of the 120 sales rows, €30,000 on each Hand tools sale, €27,000 on each Supplies sale. The pivot table adds up these copies: a €3,312,000 target and 3.3% attainment. On the right, marked correct: a four-row Targets table (Electrical 25,000, Hand tools 30,000, Paint 28,000, Supplies €27,000), linked to the Sales table by the Category column, unique on the Targets side: a €110,000 target and 100.8% attainment. On both sides, the amount sold is the same, €110,920.Two setups. On the left, marked wrong: each category’s target is copied by VLOOKUP onto every one of the 120 sales rows, €30,000 on each Hand tools sale, €27,000 on each Supplies sale. The pivot table adds up these copies: a €3,312,000 target and 3.3% attainment. On the right, marked correct: a four-row Targets table (Electrical 25,000, Hand tools 30,000, Paint 28,000, Supplies €27,000), linked to the Sales table by the Category column, unique on the Targets side: a €110,000 target and 100.8% attainment. On both sides, the amount sold is the same, €110,920.
Copied onto 120 rows, the target goes from €110,000 to €3,312,000; linked by a relationship, it is counted once.

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

  1. Two named Excel tables: Sales and Targets.
  2. 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.
  3. 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.
  4. The pivot table on the model: Insert > PivotTable, checking “Add this data to the Data Model.” The field list shows both tables.
  5. 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.
  6. 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,920

Sort, 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.

MistakeWhat the example showsFix
1. Merged or blank cells in the sourceA 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 growBuilt 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 text120 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 textGrouping by month is impossible.DATEVALUE, paste as values, date format; never mix dates and text in one column.
5. Forgetting to refreshThe 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 VLOOKUPA €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.

Two calculations of Hand tools revenue: 30 sales rows at €180 a unit, 171 units in all. On the left, marked correct: the amount is calculated in the source, row by row (1 × 180 = 180, 1 × 180 = 180, 10 × 180 = 1,800, and so on for 30 rows), then summed: €30,780. On the right, marked wrong: the calculated field Quantity × Unit price multiplies the sum of quantities, 171, by the sum of unit prices, 30 × 180 = 5,400, a total that means nothing: €923,400.Two calculations of Hand tools revenue: 30 sales rows at €180 a unit, 171 units in all. On the left, marked correct: the amount is calculated in the source, row by row (1 × 180 = 180, 1 × 180 = 180, 10 × 180 = 1,800, and so on for 30 rows), then summed: €30,780. On the right, marked wrong: the calculated field Quantity × Unit price multiplies the sum of quantities, 171, by the sum of unit prices, 30 × 180 = 5,400, a total that means nothing: €923,400.
Same category, same 30 rows: €30,780 row by row, €923,400 with the calculated field.

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):

LimitValue published by Microsoft
Rows and columns in a worksheet1,048,576 rows, 16,384 columns
Unique items per field1,048,576
Value fields per pivot table256
Report filters256, fewer if memory runs short
Row or column fieldsLimited by available memory
Items displayed in a filter dropdown list10,000
Rows per Data Model table1,999,999,997
Memory for a workbook with a Data Model32-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 web250 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.

Four steps from left to right, or top to bottom, linked by arrows, using the example company. 1, Power Query prepares: it cleans and stacks the monthly exports. 2, the Data Model connects: the Sales and Targets tables, by the Category column. 3, the pivot table summarizes: €110,920 by category and region. These three steps happen in Excel. 4, Power BI shares, outside the workbook: it takes over the first three for a single up-to-date report for every reader. This last box is highlighted in blue.Four steps from left to right, or top to bottom, linked by arrows, using the example company. 1, Power Query prepares: it cleans and stacks the monthly exports. 2, the Data Model connects: the Sales and Targets tables, by the Category column. 3, the pivot table summarizes: €110,920 by category and region. These three steps happen in Excel. 4, Power BI shares, outside the workbook: it takes over the first three for a single up-to-date report for every reader. This last box is highlighted in blue.
Three layers in Excel, a fourth to share: add a tool when the need calls for it.
Your situationThe tool that is enoughWhy
A one-off question about a single exportA pivot table, on its ownTen minutes, no project, no extra license.
The same analysis every month, export pasted in the same placeAn Excel table, a pivot table on top, RefreshThe source grows; groupings and slicers stay in place.
Several files to stack, exports to cleanPower Query, then the pivot tableThe 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 accountsThe Data Model (relationships), then the pivot tableEach table keeps its level of detail: no VLOOKUP, no double counting.
More than a million rowsPower Query and the Data Model, without going through a worksheetA worksheet stops at 1,048,576 rows; the model does not.
Several readers, one version, updates without anyone stepping in, permissions per personPower BIA 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.

Let’s talk about your reporting.

A 30-minute video call with Dylan Arnaud. You come away with a clear scope and a fixed price.

Dylan Arnaud, Power BI consultant and founder of Datafuji
Dylan ArnaudFounder · your single point of contact