A sales list with thousands of rows is in front of you, and your boss asks, "which product sold how much in which month?" You could struggle with formulas and set the filters one by one; but Excel has a tool that answers the same question in a few clicks: the pivot table. It summarizes your data at any breakdown you choose, by drag and drop, without deleting or changing the data.

In this guide we walk step by step through building a pivot table from scratch, placing fields correctly, grouping dates, adding a slicer and keeping the table up to date. Menu names may differ slightly depending on the Excel version and language setting, but the logic is almost the same.

What is a pivot table and what is it for?

A pivot table is an interactive summary report that works on top of your raw data. It shows calculations such as total, average, count, maximum or minimum value broken down by rows and columns. It does not touch the original data; it only produces a "view." This way, from the same data set, you get reports by region, by product or by month within seconds.

Typical use cases include sales reports, expense tracking, inventory summaries, customer counts, survey results and budget analysis.

Step 1: Prepare the data for the pivot table

For a pivot table to work correctly, the data must be tidy. Before you start, check the following:

  • The first row should contain column headers, and every column should have a header.
  • Headers should be unique; two columns with the same name create confusion.
  • There should be no completely empty rows or columns within the data range.
  • Do not use merged cells.
  • Each column should contain only one type of data: a date column should not contain text, and a number column should not contain text such as "none."
  • Do not keep total rows within the raw data; the pivot table calculates the totals itself.

Selecting the data range and converting it to an Excel table with Ctrl+T is very helpful. When you add new rows to the table, the pivot table's source range expands automatically, so there is no need for manual updating.

Step 2: Insert the pivot table

  1. Click any cell inside your data.
  2. From the top Insert tab, press the PivotTable button.
  3. In the window that opens, check that the source range is selected correctly.
  4. Choose to create it in a new worksheet; this prevents your raw data and the report from getting mixed up.
  5. Press OK. An empty area and the "PivotTable Fields" panel appear on the right.

Step 3: Place the fields in the right spots

The fields panel lists your column headers. You shape the table by dragging them into four areas:

AreaWhat it doesExample
RowsListed vertically on the left sideProduct name
ColumnsListed side by side as headers at the topMonth or region
ValuesThe calculated numerical summaryTotal of the sales amount
FiltersA dropdown at the top to filter the whole tableSales representative

For example, if your sales data has "Product", "Region", "Date" and "Amount" columns: drag Product into Rows, Region into Columns, and Amount into Values. The table shows the total sales of each product by region. When you rearrange the fields, the table reshapes instantly; you can experiment freely, since the data is not damaged.

Step 4: Change the value calculation

By default, Excel sums numerical fields and counts text fields. To change this, click the field in the Values area and select Value Field Settings. The options here include:

  • Sum, Count, Average, Max, Min
  • Show values as: percentage of the grand total, percentage of the row total, difference from a previous period, and similar calculations
  • Number format: currency, number of decimal places and similar display settings

If you set the number format here, it is kept when the table is updated. Formatting the cell by hand does not guarantee this.

Step 5: Group the dates

If you want to summarize daily data by month, quarter or year, add the date field to Rows. In most versions Excel automatically splits dates into year, quarter and month. If automatic grouping does not happen, you can right-click any cell in the date column and use the Group option. If you select month and year, January of two different years will not get mixed together.

If grouping does not work, there is usually a text value or an empty cell in the date column that is not a real date. Check the source data and convert the text dates into real dates.

Step 6: Add a slicer and a timeline

The dropdowns in the Filters area work, but they are not practical. Slicers are a more visual and quicker alternative. After clicking inside the pivot table, select Insert Slicer from the PivotTable Analyze tab, and tick a field such as region or product. Buttons appear on screen; when you click one, the table is filtered by that criterion. You can even build a report dashboard by connecting several pivot tables to the same slicer. For date fields, you can add a Timeline to get a scrollable filter by month or quarter.

Step 7: Pivot chart and visual layout

Turning a summary table into a chart is a single step: click inside the table, select PivotChart from the PivotTable Analyze tab. The chart changes together with the slicers and filters. For report presentations, using only one or two chart types and keeping the table simple strengthens the message. You can easily adjust the look of the table by choosing ready-made styles from the Design tab.

Calculated field and additional tips

Sometimes you need a calculation that does not exist in the data; for example, there are "Amount" and "Quantity" columns but no unit price. You can define a new field by selecting Calculated Field from the Fields, Items & Sets menu on the PivotTable Analyze tab (e.g., Amount / Quantity). This field is specific to the pivot table and does not change the source data.

A few more small tips: if you add more than one field to Rows, you get a hierarchical view (region, with products beneath it). Use the Design tab to collapse and expand subtotals. To stop column widths from breaking on every refresh, uncheck "Autofit column widths on update" in PivotTable Options. In large tables, to see the ten records with the highest values, use the "Top 10" option in the row label filter.

Refreshing: what to do when the data changes

A pivot table is not automatically updated when the source data changes. Right-click the table and select Refresh, or use the Alt+F5 shortcut. To update all pivot tables in the workbook together, there is the Refresh All button. If you want automatic refresh when the file opens, you can tick "Refresh data when opening the file" in PivotTable Options. If you made your source range an Excel table, new rows are included in the table on refresh.

Common mistakes

  1. Empty header: A column without a header prevents the pivot table from being created.
  2. Forgetting to refresh: This is the most common reason a table shows old data.
  3. Numbers stored as text: If a numeric column is being counted as "Count", the cells are in text format; convert them to numbers.
  4. Adding a total row to the raw data: The total gets counted twice.
  5. Typing inside the pivot table: Do not change the values inside the pivot table by hand; they will be lost on refresh.

Which Excel version is needed?

The pivot table is available in almost all desktop versions of Excel. New features (automatic date grouping, suggested pivot tables and so on) differ from version to version. A perpetual-licensed version may be enough: Office 2024 Unlimited or Office 2021 Unlimited include basic analysis tools such as pivot tables, slicers and timelines. If you want continuously updated features and cloud sync, Office 365 1-year or the single-user Personalized Office 365 may be more suitable. Mac users should look at Mac-specific versions such as Office 2024 BIND for MacOS. You can see all of them in the software licenses category; on LisansX, delivery is digital and the scope is stated on the product page.

Frequently Asked Questions

What is the difference between a pivot table and a normal table?

A normal table shows the raw data row by row. A pivot table summarizes this data by adding, counting or averaging it; you decide by drag and drop which field appears where.

Does a pivot table change my source data?

No. A pivot table produces a read-only view. The raw data stays as it is.

Can I create a pivot table from data in another file?

Yes. You can create pivot tables from different sources by setting up an external data connection or by using the data model. At the start, however, bringing the data into the same workbook is the simplest route.

Can I show two different calculations in a pivot table?

Yes. Drag the same field into Values twice and give one a total and the other a percentage calculation.