Creating a basic pivot table
- By Bill Jelen
- 2/17/2025
- Format your source data before creating a pivot table
- How to create a basic pivot table
- Understanding the Analyze Data, Copilot, and Recommended PivotTable features
- Using slicers to filter your report
- Keeping up with changes in the data source
- Sharing the pivot cache or creating a new cache
- Saving time with PivotTable tools
- Next steps
How to create a basic pivot table
Now that you have a good understanding of the importance of a well-structured data source, let’s walk through creating a basic pivot table.
To ensure that the pivot table captures the range of your data source by default, click any single cell in your data source. Next, select the Insert tab and find the Tables group. In the Tables group, select PivotTable and then choose From Table/Range from the dropdown. Figure 2-12 demonstrates how to start a pivot table.
FIGURE 2.12 Start a pivot table by selecting PivotTable from the Insert tab.
Choosing these options activates the Create PivotTable dialog, shown in Figure 2-13.
FIGURE 2.13 The Create PivotTable dialog.
As you can see in Figure 2-13, the Create PivotTable dialog asks you only two fundamental questions:
Where’s the data that you want to analyze?
Where do you want to put the pivot table?
Here’s how you handle these two sections of the dialog:
Choose The Data That You Want To Analyze—In this section, you tell Excel where your data set is. You can specify a data set that is located within your workbook, or you can tell Excel to look for an external data set. As you can see in Figure 2-13, Excel is smart enough to read your data set and fill in the range for you. However, you should always take note of the range Excel selects to ensure that you are capturing all your data.
Choose Where You Want The PivotTable Report To Be Placed—In this section, you tell Excel where you want your pivot table to be placed. This is set to New Worksheet by default, meaning that your pivot table will be placed in a new worksheet within the current workbook. You will rarely change this setting because there are relatively few times you’ll need your pivot table to be placed in a specific location.
After you have answered the two questions in the Create PivotTable dialog, simply click the OK button. At this point, Excel adds a new worksheet that contains an empty pivot table report. Next to that is the PivotTable Fields list, shown in Figure 2-14. This pane helps you build your pivot table.
FIGURE 2.14 You use the PivotTable Fields list to build a pivot table.
Adding fields to a report
You can add the fields you need to a pivot table by using the four “areas” found in the PivotTable Fields list: Filters, Columns, Rows, and Values. These areas, which correspond to the four areas of the pivot table, are used to populate your pivot table with data:
Filters—Adding a field to the Filters area enables you to filter on its unique data items. In previous versions of Excel, this area was known as the Report Filters area.
Columns—Adding a field into the Columns area displays the unique values from that field across the top of the pivot table.
Rows—Adding a field into the Rows area displays the unique values from that field down the left side of the pivot table.
Values—Adding a field into the Values area includes that field in the Values area of your pivot table, allowing you to perform a specified calculation using the values in the field.
Fundamentals of laying out a pivot table report
Now, let’s pause a moment and go over some fundamentals of laying out a pivot table report. This is generally the point where most new Excel customers get stuck. How do you know which field goes where?
Before you start dropping fields into the various areas, answer two questions:
“What am I measuring?”
“How do I want to see it?”
The answer to the first question tells you which fields in your data source you need to work with, and the answer to the second question tells you where to place the fields.
Let’s say you wanted to measure the dollar sales by region. This would automatically tell you that you need to work with the Sale Amount and Region fields. How do you want to see it? You want regions to go down the left side of the report and the sales amount to be calculated next to each region.
To achieve this effect, you need to add the Region field to the Rows area and add the Sale Amount field to the Values area.
Find the Region field in the PivotTable Fields list and select the checkbox next to it. As you can see in Figure 2-15, not only is the field automatically added to the Rows area, but also your pivot table is updated to show the unique region names.
FIGURE 2.15 Select the checkbox next to the Region field to automatically add that field to your pivot table.
Now that you have regions in your pivot table, it’s time to add in the dollar sales. To do that, simply find the Sale Amount field and select the checkbox next to it. As Figure 2-16 shows, the Sale Amount field is automatically added to the Values area, and your pivot table report now shows the total dollar sales for each region.
FIGURE 2.16 Select the checkbox next to the Sale Amount field to add data to your pivot table report.
At this point, you have already created your first pivot table report!
Adding layers to a pivot table
Now, you can add another layer of analysis to your report. Say that now you want to measure the amount of dollar sales each region earned by product category. Because your pivot table already contains the Region and Sales Amount fields, all you have to do is select the checkbox next to the Product Category field. As you can see in Figure 2-17, your pivot table automatically added a layer for the Product Category and refreshed the calculations to include subtotals for each region. Because the data is stored efficiently in the pivot cache, this change took less than a second.
FIGURE 2.17 Without pivot tables, adding layers to analyses requires hours of work and complex formulas.
Rearranging a pivot table
Suppose that the view you’ve created doesn’t work for your manager. He wants to see Product Categories across the top of the pivot table report. To make this change, simply drag the Product Category field from the Rows area to the Columns area, as illustrated in Figure 2-18.
FIGURE 2.18 Rearranging a pivot table is as simple as dragging fields from one area to another.
The report is instantly restructured, as shown in Figure 2-19.
FIGURE 2.19 Your product categories are now column-oriented.
Creating a report filter
You might be asked to produce different reports for particular regions, markets, or products. Instead of building separate pivot table reports for every possible analysis scenario, you can use the Filter field to create a report filter. For example, you can create a region-filtered report by simply dragging the Region field to the Filters area and the Product Category field to the Rows area. This way, you can analyze one particular region at a time. Figure 2-21 shows the totals for just the North region.
FIGURE 2.21 With this setup, you not only can see revenues by product clearly, but also can click the Region dropdown to focus on one region.

TIP
NOTE
CAUTION