What is pivot table what is pivot table in excel

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 More…Less

You can use a PivotTable to summarize, analyze, explore, and present summary data. PivotCharts complement PivotTables by adding visualizations to the summary data in a PivotTable, and allow you to easily see comparisons, patterns, and trends. Both PivotTables and PivotCharts enable you to make informed decisions about critical data in your enterprise. You can also connect to external data sources such as SQL Server tables, SQL Server Analysis Services cubes, Azure Marketplace, Office Data Connection (.odc) files, XML files, Access databases, and text files to create PivotTables, or use existing PivotTables to create new tables.

A PivotTable is an interactive way to quickly summarize large amounts of data. You can use a PivotTable to analyze numerical data in detail, and answer unanticipated questions about your data. A PivotTable is especially designed for:

  • Querying large amounts of data in many user-friendly ways.

  • Subtotaling and aggregating numeric data, summarizing data by categories and subcategories, and creating custom calculations and formulas.

  • Expanding and collapsing levels of data to focus your results, and drilling down to details from the summary data for areas of interest to you.

  • Moving rows to columns or columns to rows (or «pivoting») to see different summaries of the source data.

  • Filtering, sorting, grouping, and conditionally formatting the most useful and interesting subset of data enabling you to focus on just the information you want.

  • Presenting concise, attractive, and annotated online or printed reports.

For example, here’s a simple list of household expenses on the left, and a PivotTable based on the list to the right:

Sales data

Corresponding PivotTable

Sample household expense data to create a PivotTable with Months, Categories and Amounts

Sample PivotTable with Categories in the Rows section and Months in the columns section

For more information, see Create a PivotTable to analyze worksheet data.

After you create a PivotTable by selecting its data source, arranging fields in the PivotTable Field List, and choosing an initial layout, you can perform the following tasks as you work with a PivotTable:

Explore the data    by doing the following:

  • Expand and collapse data, and show the underlying details that pertain to the values.

  • Sort, filter, and group fields and items.

  • Change summary functions, and add custom calculations and formulas.

Change the form layout and field arrangement     by doing the following:

  • Change the PivotTable form: Compact, Outline, or Tabular.

  • Add, rearrange, and remove fields.

  • Change the order of fields or items.

Change the layout of columns, rows, and subtotals     by doing the following:

  • Turn column and row field headers on or off, or display or hide blank lines.

  • Display subtotals above or below their rows.

  • Adjust column widths on refresh.

  • Move a column field to the row area or a row field to the column area.

  • Merge or unmerge cells for outer row and column items.

Change the display of blanks and errors     by doing the following:

  • Change how errors and empty cells are displayed.

  • Change how items and labels without data are shown.

  • Display or hide blank rows

Change the format     by doing the following:

  • Manually and conditionally format cells and ranges.

  • Change the overall PivotTable format style.

  • Change the number format for fields.

  • Include OLAP Server formatting.

For more information, see Design the layout and format of a PivotTable.

PivotCharts provide graphical representations of the data in their associated PivotTables. PivotCharts are also interactive. When you create a PivotChart, the PivotChart Filter Pane appears. You can use this filter pane to sort and filter the PivotChart’s underlying data. Changes that you make to the layout and data in an associated PivotTable are immediately reflected in the layout and data in the PivotChart and vice versa.

PivotCharts display data series, categories, data markers, and axes just as standard charts do. You can also change the chart type and other options such as the titles, the legend placement, the data labels, the chart location, and so on.

Here’s a PivotChart based on the PivotTable example above.

Example of an Excel PivotChart

For more information, see Create a PivotChart.

If you are familiar with standard charts, you will find that most operations are the same in PivotCharts. However, there are some differences:

Row/Column orientation    Unlike a standard chart, you cannot switch the row/column orientation of a PivotChart by using the Select Data Source dialog box. Instead, you can pivot the Row and Column labels of the associated PivotTable to achieve the same effect.

Chart types     You can change a PivotChart to any chart type except an xy (scatter), stock, or bubble chart.

Source data     Standard charts are linked directly to worksheet cells, while PivotCharts are based on their associated PivotTable’s data source. Unlike a standard chart, you cannot change the chart data range in a PivotChart’s Select Data Source dialog box.

Formatting     Most formatting—including chart elements that you add, layout, and style—is preserved when you refresh a PivotChart. However, trendlines, data labels, error bars, and other changes to data sets are not preserved. Standard charts do not lose this formatting once it is applied.

Although you cannot directly resize the data labels in a PivotChart, you can increase the text font size to effectively resize the labels.

You can use data from a Excel worksheet as the basis for a PivotTable or PivotChart. The data should be in list format, with column labels in the first row, which Excel will use for Field Names. Each cell in subsequent rows should contain data appropriate to its column heading, and you shouldn’t mix data types in the same column. For instance, you shouldn’t mix currency values and dates in the same column. Additionally, there shouldn’t be any blank rows or columns within the data range.

Excel tables    Excel tables are already in list format and are good candidates for PivotTable source data. When you refresh the PivotTable, new and updated data from the Excel table is automatically included in the refresh operation.

Using a dynamic named range    To make a PivotTable easier to update, you can create a dynamic named range, and use that name as the PivotTable’s data source. If the named range expands to include more data, refreshing the PivotTable will include the new data.

Including totals    Excel automatically creates subtotals and grand totals in a PivotTable. If the source data contains automatic subtotals and grand totals that you created by using the Subtotals command in the Outline group on the Data tab, use that same command to remove the subtotals and grand totals before you create the PivotTable.

You can retrieve data from an external data source such as a database, an Online Analytical Processing (OLAP) cube, or a text file. For example, you might maintain a database of sales records you want to summarize and analyze.

Office Data Connection files    If you use an Office Data Connection (ODC) file (.odc) to retrieve external data for a PivotTable, you can input the data directly into a PivotTable. We recommend that you retrieve external data for your reports by using ODC files.

OLAP source data    When you retrieve source data from an OLAP database or a cube file, the data is returned to Excel only as a PivotTable or a PivotTable that has been converted to worksheet functions. For more information, see Convert PivotTable cells to worksheet formulas.

Non-OLAP source data    This is the underlying data for a PivotTable or a PivotChart that comes from a source other than an OLAP database. For example, data from relational databases or text files.

For more information, see Create a PivotTable with an external data source.

The PivotTable cache    Each time that you create a new PivotTable or PivotChart, Excel stores a copy of the data for the report in memory, and saves this storage area as part of the workbook file — this is called the PivotTable cache. Each new PivotTable requires additional memory and disk space. However, when you use an existing PivotTable as the source for a new one in the same workbook, both share the same cache. Because you reuse the cache, the workbook size is reduced and less data is kept in memory.

Location requirements    To use one PivotTable as the source for another, both must be in the same workbook. If the source PivotTable is in a different workbook, copy the source to the workbook location where you want the new one to appear. PivotTables and PivotCharts in different workbooks are separate, each with its own copy of the data in memory and in the workbooks.

Changes affect both PivotTables    When you refresh the data in the new PivotTable, Excel also updates the data in the source PivotTable, and vice versa. When you group or ungroup items, or create calculated fields or calculated items in one, both are affected. If you need to have a PivotTable that’s independent of another one, then you can create a new one based on the original data source, instead of copying the original PivotTable. Just be mindful of the potential memory implications of doing this too often.

PivotCharts     You can base a new PivotTable or PivotChart on another PivotTable, but you cannot base a new PivotChart directly on another PivotChart. Changes to a PivotChart affect the associated PivotTable, and vice versa.

Changes in the source data can result in different data being available for analysis. For example, you may want to conveniently switch from a test database to a production database. You can update a PivotTable or a PivotChart with new data that is similar to the original data connection information by redefining the source data. If the data is substantially different with many new or additional fields, it may be easier to create a new PivotTable or PivotChart.

Displaying new data brought in by refresh     Refreshing a PivotTable can also change the data that is available for display. For PivotTables based on worksheet data, Excel retrieves new fields within the source range or named range that you specified. For reports based on external data, Excel retrieves new data that meets the criteria for the underlying query or data that becomes available in an OLAP cube. You can view any new fields in the Field List and add the fields to the report.

Changing OLAP cubes that you create     Reports based on OLAP data always have access to all of the data in the cube. If you created an offline cube that contains a subset of the data in a server cube, you can use the Offline OLAP command to modify your cube file so that it contains different data from the server.

See Also

Create a PivotTable to analyze worksheet data

Create a PivotChart

PivotTable options

Use PivotTables and other business intelligence tools to analyze your data

Need more help?

If you are reading this tutorial, there is a big chance you have heard of (or even used) the Excel Pivot Table. It’s one of the most powerful features in Excel (no kidding).

The best part about using a Pivot Table is that even if you don’t know anything in  Excel, you can still do pretty awesome things with it with a very basic understanding of it.

Let’s get started.

Click here to download the sample data and follow along.

What is a Pivot Table and Why Should You Care?

A Pivot Table is a tool in Microsoft Excel that allows you to quickly summarize huge datasets (with a few clicks).

Even if you’re absolutely new to the world of Excel, you can easily use a Pivot Table. It’s as easy as dragging and dropping rows/columns headers to create reports.

Suppose you have a dataset as shown below:

Creating a Pivot Table in Excel - Dataset

This is sales data that consists of ~1000 rows.

It has the sales data by region, retailer type, and customer.

Now your boss may want to know a few things from this data:

  • What were the total sales in the South region in 2016?
  • What are the top five retailers by sales?
  • How did The Home Depot’s performance compare against other retailers in the South?

You can go ahead and use Excel functions to give you the answers to these questions, but what if suddenly your boss comes up with a list of five more questions.

You’ll have to go back to the data and create new formulas every time there is a change.

This is where Excel Pivot Tables comes in really handy.

Within seconds, a Pivot Table will answer all these questions (as you’ll learn below).

But the real benefit is that it can accommodate your finicky data-driven boss by answering his questions immediately.

It’s so simple, you may as well take a few minutes and show your boss how to do it himself.

Hopefully, now you have an idea of why Pivot Tables are so awesome. Let’s go ahead and create a Pivot Table using the data set (shown above).

Inserting a Pivot Table in Excel

Here are the steps to create a pivot table using the data shown above:

As soon as you click OK, a new worksheet is created with the Pivot Table in it.

While the Pivot Table has been created, you’d see no data in it. All you’d see is the Pivot Table name and a single line instruction on the left, and Pivot Table Fields on the right.

Creating a Pivot Table in Excel - Blank Pivot Table Worksheet

Now before we jump into analyzing data using this Pivot Table, let’s understand what are the nuts and bolts that make an Excel Pivot Table.

Also read: 10 Excel Pivot Table Keyboard Shortcuts

The Nuts & Bolts of an Excel Pivot Table

To use a Pivot Table efficiently, it’s important to know the components that create a pivot table.

In this section, you’ll learn about:

  • Pivot Cache
  • Values Area
  • Rows Area
  • Columns Area
  • Filters Area

Pivot Cache

As soon as you create a Pivot Table using the data, something happens in the backend. Excel takes a snapshot of the data and stores it in its memory. This snapshot is called the Pivot Cache.

When you create different views using a Pivot Table, Excel does not go back to the data source, rather it uses the Pivot Cache to quickly analyze the data and give you the summary/results.

The reason a pivot cache gets generated is to optimize the pivot table functioning. Even when you have thousands of rows of data, a pivot table is super fast in summarizing the data. You can drag and drop items in the rows/columns/values/filters boxes and it will instantly update the results.

Note: One downside of pivot cache is that it increases the size of your workbook. Since it’s a replica of the source data, when you create a pivot table, a copy of that data gets stored in the Pivot Cache.

Read More: What is Pivot Cache and How to Best Use It.

Values Area

The Values Area is what holds the calculations/values.

Based on the data set shown at the beginning of the tutorial, if you quickly want to calculate total sales by region in each month, you can get a pivot table as shown below (we’ll see how to create this later in the tutorial).

The area highlighted in orange is the Values Area.

Creating a Pivot Table in Excel - Values Area

In this example, it has the total sales in each month for the four regions.

Rows Area

The headings to the left of the Values area makes the Rows area.

In the example below, the Rows area contains the regions (highlighted in red):
Creating a Pivot Table in Excel - Rows Area

Columns Area

The headings at the top of the Values area makes the Columns area.

In the example below, Columns area contains the months (highlighted in red):

Creating a Pivot Table in Excel - Columns Area

Filters Area

Filters area is an optional filter that you can use to further drill down in the data set.

For example, if you only want to see the sales for Multiline retailers, you can select that option from the drop down (highlighted in the image below), and the Pivot Table would update with the data for Multiline retailers only.

Creating a Pivot Table in Excel - Filters Area

Analyzing Data Using the Pivot Table

Now, let’s try and answer the questions by using the Pivot Table we have created.

Click here to download the sample data and follow along.

To analyze data using a Pivot Table, you need to decide how you want the data summary to look in the final result. For example, you may want all the regions in the left and the total sales right next to it. Once you have this clarity in mind, you can simply drag and drop the relevant fields in the Pivot Table.

In the Pivot Tabe Fields section, you have the fields and the areas (as highlighted below):

Creating a Pivot Table in Excel - Fields and Area

The Fields are created based on the backend data used for the Pivot Table. The Areas section is where you place the fields, and according to where a field goes, your data is updated in the Pivot Table.

It’s a simple drag and drop mechanism, where you can simply drag a field and put it in one of the four areas. As soon as you do this, it will appear in the Pivot Table in the worksheet.

Creating a Pivot Table in Excel - Demo

Now let’s try and answer the questions your manager had using this Pivot Table.

Q1: What were the total sales in the South region?

Drag the Region field in the Rows area and the Revenue field in the Values area. It would automatically update the Pivot Table in the worksheet.

Note that as soon as you drop the Revenue field in the Values area, it becomes Sum of Revenue. By default, Excel sums all the values for a given region and shows the total. If you want, you can change this to Count, Average, or other statistics metrics. In this case, the sum is what we needed.

The answer to this question would be 21225800.

Creating a Pivot Table in Excel - Q1a

Q2 What are the top five retailers by sales?

Drag the Customer field in the Row area and Revenue field in the values area. In case, there are any other fields in the area section and you want to remove it, simply select it and drag it out of it.

You’ll get a Pivot Table as shown below:

Creating a Pivot Table in Excel - Q2a

Note that by default, the items (in this case the customers) are sorted in an alphabetical order.

To get the top five retailers, you can simply sort this list and use the top five customer names. To do this:

This will give you a sorted list based on total sales.

Creating a Pivot Table in Excel - Q2d

Q3: How did The Home Depot’s performance compare against other retailers in the South?

You can do a lot of analysis for this question, but here let’s just try and compare the sales.

Drag the Region Field in the Rows area. Now drag the Customer field in the Rows area below the Region field. When you do this, Excel would understand that you want to categorize your data first by region and then by customers within the regions. You’ll have something as shown below:

Creating a Pivot Table in Excel - Q3a

Now drag the Revenue field in the Values area and you’ll have the sales for each customer (as well as the overall region).

Creating a Pivot Table in Excel - Q3b

You can sort the retailers based on the sales figures by following the below steps:

  • Right-click on a cell that has the sales value for any retailer.
  • Go to Sort –> Sort Largest to Smallest.

This would instantly sort all the retailers by the sales value.

Now you can quickly scan through the South region and identify that The Home Depot sales were 3004600 and it did better than four retailers in the South region.

Creating a Pivot Table in Excel - Q3c

Now there are more than one ways to skin the cat. You can also put the Region in the Filter area and then only select the South Region.

Click here to download the sample data.

I hope this tutorial gives you a basic overview of Excel Pivot Tables and helps you in getting started with it.

Here are some more Pivot Table Tutorials you may like:

  • Preparing Source Data For Pivot Table.
  • How to Apply Conditional Formatting in a Pivot Table in Excel.
  • How to Group Dates in Pivot Tables in Excel.
  • How to Group Numbers in Pivot Table in Excel.
  • How to Filter Data in a Pivot Table in Excel.
  • Using Slicers in Excel Pivot Table.
  • How to Replace Blank Cells with Zeros in Excel Pivot Tables.
  • How to Add and Use an Excel Pivot Table Calculated Fields.
  • How to Refresh Pivot Table in Excel.

The pivot table is one of Microsoft Excel’s most powerful — and intimidating — functions. Pivot tables can help you summarize and make sense of large data sets. However, they also have a reputation for being complicated.

Computer with pivot table examples over an orange background with a green arch.

The good news is that learning how to create a pivot table in Excel is much easier than you may believe.

We’re going to walk you through the process of creating a pivot table and show you just how simple it is. First, though, let’s take a step back and make sure you understand exactly what a pivot table is, and why you might need to use one.

What is a pivot table?
What are pivot tables used for?
How to Create a Pivot Table
Pivot Table Examples

Download 10 Excel Templates for Marketers [Free Kit]

What is a pivot table?

A pivot table is a summary of your data, packaged in a chart that lets you report on and explore trends based on your information. Pivot tables are particularly useful if you have long rows or columns that hold values you need to track the sums of and easily compare to one another.

In other words, pivot tables extract meaning from that seemingly endless jumble of numbers on your screen. And more specifically, it lets you group your data in different ways so you can draw helpful conclusions more easily.

The «pivot» part of a pivot table stems from the fact that you can rotate (or pivot) the data in the table to view it from a different perspective. To be clear, you’re not adding to, subtracting from, or otherwise changing your data when you make a pivot. Instead, you’re simply reorganizing the data so you can reveal useful information.

What are pivot tables used for?

If you’re still feeling a bit confused about what pivot tables actually do, don’t worry. This is one of those technologies that are much easier to understand once you’ve seen it in action.

The purpose of pivot tables is to offer user-friendly ways to quickly summarize large amounts of data. They can be used to better understand, display, and analyze numerical data in detail.

With this information, you can help identify and answer unanticipated questions surrounding the data.

Here are seven hypothetical scenarios where a pivot table could be helpful.

1. Comparing Sales Totals of Different Products

Let’s say you have a worksheet that contains monthly sales data for three different products — product 1, product 2, and product 3. You want to figure out which of the three has been generating the most revenue.

One way would be to look through the worksheet and manually add the corresponding sales figure to a running total every time product 1 appears. The same process can then be done for product 2, and product 3 until you have totals for all of them. Piece of cake, right?

Imagine, now, that your monthly sales worksheet has thousands upon thousands of rows. Manually sorting through each necessary piece of data could literally take a lifetime.

With pivot tables, you can automatically aggregate all of the sales figures for product 1, product 2, and product 3 — and calculate their respective sums — in less than a minute.

pivot table examples, compare sales totals of different productsImage source

2. Showing Product Sales as Percentages of Total Sales

Pivot tables inherently show the totals of each row or column when created. That’s not the only figure you can automatically produce, however.

Let’s say you entered quarterly sales numbers for three separate products into an Excel sheet and turned this data into a pivot table. The pivot table automatically gives you three totals at the bottom of each column — having added up each product’s quarterly sales.

But what if you wanted to find the percentage these product sales contributed to all company sales, rather than just those products’ sales totals?

With a pivot table, instead of just the column total, you can configure each column to give you the column’s percentage of all three column totals.

Let’s say three products totaled $200,000 in sales. The first product made $45,000, you can edit a pivot table to instead say this product contributed 22.5% of all company sales.

To show product sales as percentages of total sales in a pivot table, simply right-click the cell carrying a sales total and select Show Values As > % of Grand Total.

pivot table examples, product sales as percentageImage source

3. Combining Duplicate Data

In this scenario, you’ve just completed a blog redesign and had to update many URLs. Unfortunately, your blog reporting software didn’t handle the change well and split the «view» metrics for single posts between two different URLs.

In your spreadsheet, you now have two separate instances of each individual blog post. To get accurate data, you need to combine the view totals for each of these duplicates.

BostonImage source

Instead of having to manually search for and combine all the metrics from the duplicates, you can summarize your data (via pivot table) by blog post title.

Voilà, the view metrics from those duplicate posts will be aggregated automatically.

pivot table examples, combine complex dataImage source

4. Getting an Employee Headcount for Separate Departments

Pivot tables are helpful for automatically calculating things that you can’t easily find in a basic Excel table. One of those things is counting rows that all have something in common.

For instance, let’s say you have a list of employees in an Excel sheet. Next to the employees’ names are the respective departments they belong to. You can create a pivot table from this data that shows you each department’s name and the number of employees that belong to those departments.

The pivot table’s automated functions effectively eliminate your task of sorting the Excel sheet by department name and counting each row manually.

5. Adding Default Values to Empty Cells

Not every dataset you enter into Excel will populate every cell. If you’re waiting for new data to come in, you might have lots of empty cells that look confusing or need further explanation.

That’s where pivot tables come in.

pivot table examples, combine complex dataImage source

You can easily customize a pivot table to fill empty cells with a default value, such as $0, or TBD (for «to be determined»). For large data tables, being able to tag these cells quickly is a valuable feature when many people are reviewing the same sheet.

To automatically format the empty cells of your pivot table, right-click your table and click PivotTable Options.

In the window that appears, check the box labeled Empty Cells As and enter what you’d like displayed when a cell has no other value.

pivot table examples, empty cells Image source

  1. Enter your data into a range of rows and columns.
  2. Sort your data by a specific attribute.
  3. Highlight your cells to create your pivot table.
  4. Drag and drop a field into the «Row Labels» area.
  5. Drag and drop a field into the «Values» area.
  6. Fine-tune your calculations.

Now that you have a better sense of what pivot tables can be used for, let’s get into the nitty-gritty of how to actually create one.

Step 1. Enter your data into a range of rows and columns.

Every pivot table in Excel starts with a basic Excel table, where all your data is housed. To create this table, simply enter your values into a specific set of rows and columns. Use the topmost row or the topmost column to categorize your values by what they represent.

For example, to create an Excel table of blog post performance data, you might have:

  • A column listing each «Top Pages.»
  • A column listing each URL’s «Clicks.»
  • A column listing each post’s «Impressions.»

We’ll be using that example in the steps that follow.

pivot table, enter your data into a range of rows and columns.

Step 2. Sort your data by a specific attribute.

Once you’ve entered all your data into your Excel sheet, you’ll want to sort your data by attribute. This will make your information easier to manage once it becomes a pivot table.

To sort your data, click the Data tab in the top navigation bar and select the Sort icon underneath it. In the window that appears, you can sort your data by any column you want and in any order.

For example, to sort your Excel sheet by «Views to Date,» select this column title under Column and then select whether you want to order your posts from smallest to largest, or from largest to smallest.

Select OK on the bottom-right of the Sort window.

Now, you’ve successfully reordered each row of your Excel sheet by the number of views each blog post has received.

pivot table, sort data

Step 3. Highlight your cells to create your pivot table.

Once you’ve entered and sorted your data, highlight the cells you’d like to summarize in a pivot table. Click Insert along the top navigation, and select the PivotTable icon.

You can also click anywhere in your worksheet, select «PivotTable,» and manually enter the range of cells you’d like included in the PivotTable.

This opens an options box. Here you can select whether or not to launch this pivot table in a new worksheet or keep it in the existing worksheet, in addition to setting your cell range.

If you open a new sheet, you can navigate to and away from it at the bottom of your Excel workbook. Once you’ve chosen, click OK.

Alternatively, you can highlight your cells, select Recommended PivotTables to the right of the PivotTable icon, and open a pivot table with pre-set suggestions for how to organize each row and column.

pivot table, highlight cells you want to include in the pivot table

Note: If using an earlier version of Excel, «PivotTables» may be under Tables or Data along the top navigation, rather than «Insert.» In Google Sheets, you can create pivot tables from the Data dropdown along the top navigation.

Step 4. Drag and drop a field into the «Row Labels» area.

After you’ve completed Step 3, Excel will create a blank pivot table for you.

Your next step is to drag and drop a field — labeled according to the names of the columns in your spreadsheet — into the Row Labels area. This will determine what unique identifier the pivot table will organize your data by.

For example, let’s say you want to organize a bunch of blogging data by post title. To do that, you’d simply click and drag the “Top pages” field to the «Row Labels» area.

pivot table, drag and drop a field into the "Row Labels" area.

Note: Your pivot table may look different depending on which version of Excel you’re working with. However, the general principles remain the same.

Step 5. Drag and drop a field into the «Values» area.

Once you’ve established how you’re going to organize your data, your next step is to add in some values by dragging a field into the Values area.

Sticking with the blogging data example, let’s say you want to summarize blog post views by title. To do this, you’d simply drag the «Views» field into the Values area.

pivot tables, drag and drop a field into the "Values" area.

Step 6. Fine-tune your calculations.

The sum of a particular value will be calculated by default, but you can easily change this to something like average, maximum, or minimum depending on what you want to calculate.

On a Mac, you can do this by clicking on the small i next to a value in the «Values» area, selecting the option you want, and clicking «OK.» Once you’ve made your selection, your pivot table will be updated accordingly.

If you’re using a PC, you’ll need to click on the small upside-down triangle next to your value and select Value Field Settings to access the menu.

pivot tables,  fine-tune your calculations.

When you’ve categorized your data to your liking, save your work and use it as you please.

Pivot Table Examples

From managing money to keeping tabs on your marketing effort, pivot tables can help you keep track of important data. The possibilities are endless!

See three pivot table examples below to keep you inspired.

1. Creating a PTO Summary and Tracker

pivot table examples, pto summaryImage source

If you’re in HR, running a business, or leading a small team, managing employees’ vacations is essential. This pivot allows you to seamlessly track this data.

All you need to do is import your employee’s identification data along with the following data:

  • Sick time.
  • Hours of PTO.
  • Company holidays.
  • Overtime hours.
  • Employee’s regular number of hours.

From there, you can sort your pivot table by any of these categories.

2. Building a Budget

pivot table examples, budgetImage source

Whether you’re running a project or just managing your own money, pivot tables are an excellent tool for tracking spend.

The simplest budget just requires the following categories:

  • Date of transaction
  • Withdrawal/Expenses
  • Deposit/Income
  • Description
  • Any overarching categories (like paid ads or contractor fees)

With this information, you can see your biggest expenses and brainstorm ways to save.

3. Tracking Your Campaign Performance

pivot table examples, campaign performanceImage source

Pivot tables can help your team assess the performance of your marketing campaigns.

In this example, campaign performance is split by region. You can easily which country had the highest conversions during different campaigns.

This can help you identify tactics that perform well in each region and where advertisements need to be changed.

Digging Deeper With Pivot Tables

You’ve now learned the basics of pivot table creation in Excel. With this understanding, you can figure out what you need from your pivot table and find the solutions you’re looking for.

For example, you may notice that the data in your pivot table isn’t sorted the way you’d like. If this is the case, Excel’s Sort function can help you out. Alternatively, you may need to incorporate data from another source into your reporting, in which case the VLOOKUP function could come in handy.

Editor’s note: This post was originally published in December 2018 and has been updated for comprehensiveness.

excel marketing templates

A Pivot Table is an Excel tool that allows you to extract data in a preferred format (dashboard/reports) from large data sets contained within a worksheet. It can summarize, sort, group, and reorganize data, as well as execute other complex calculations on it.

It is available in the “Tables” section of the “Insert” tab. The keyboard shortcut to insert Pivot Table in excel is – “ALT+D+P.” The content of Pivot Table changes whenever there is a change in the data source.

Table of contents
  • Pivot Table in Excel
    • How to Create a Pivot Table in Excel?
      • Method #1
      • Method #2
    • Pivot Table Uses
      • #1 – “Max” of Science marks by Maths marks
      • #2 – Average of Maths Marks Column
    • Frequently Asked Questions (FAQs)
    • Recommended Articles

How to Create a Pivot Table in Excel?

The Pivot Table is created by using the following methods:

Method #1

Pivot Table in excel can be created using the following steps

  1. Click a cell in the data worksheet.
  2. In the “Tables” section of the “Insert” tab, click “Pivot Table.”

    pivot table method 1.1

  3. A “Create Pivot Table” window appears (as shown below).

    excel pivot table method 1.2

  4. Now under the option “Choose the data that you want to analyze,” Excel automatically selects the data range.
  5. The data range is displayed in the “Table/Range” box under the “Select a table or range.”
  6. In the “Table/Range” option, we can verify the selected cell range (shown in the below image).

    excel pivot table method 1.3

  7. The next step is to choose the location of the Pivot Table report. The worksheet can either be the existing or a new one.
  8. In this example of Excel Pivot Table, cell D1 is selected. Under the option “Choose where you want the Pivot Table report to be placed,” select “Existing Worksheet” (shown in the below image).

    excel pivot table method 1.4

    Note: Select “New Worksheet” if we prefer to insert a Pivot Table on the new worksheet (as shown in the below image).

    excel pivot table method 1.6

  9. To analyze multiple tables, go to the option “Choose whether you want to analyze multiple tables” and click the below checkbox “Add this data to the Data Model.”

    excel pivot table method 1.5

  10. Click “OK” to insert the Pivot Table in the worksheet, depending on the location selected.

    If we select “New Worksheet,” the “Pivot Table 1” is placed on the new empty worksheet.

    The succeeding image shows a column named “Pivot Table Fields” on the right-hand side. This shows a list of fields or columns to be added to the Pivot Table report.

    Now, the Pivot Table is created on the Column range A (“Maths”) and Column B (“Science”), respectively. The same is displayed in the “Fields” list (shown in the below image).

    excel pivot table method 1.7

Method #2

  • At first, select the data range. It is an input to the Pivot Table.

excel pivot table method 2.1

  • Go to the “Insert” tab and select “Recommended Pivot Tables.” This option provides the recommended ways of creating Pivot Tables. The user can select and choose one among the given recommendations.

excel pivot table method 2.2

  • The below image shows the two recommendations given by Excel. One is the “Sum of Maths by Science,” and the other is “Sum of Science by Maths.”

excel pivot table method 2.3

  • When you click one of the options, the actual Pivot Table along with the values, opens in the right-hand-side panel.

excel pivot table method 2.4

  • Here, the “Group by” option provides the following ways of grouping:
  1. “Add Science column marks group by Maths column marks” 
  2. “Add Maths column marks group by Science column marks”
  • The user can select either of the two ways of grouping. The grouped data is displayed in ascending order (for both the ways of grouping).
  • The other option is “Blank Pivot Table.” To create a new Pivot Table, click “Blank Pivot Table” box. It is displayed at the bottom (left-hand side) of the “Recommended Pivot Tables” window as shown in the succeeding image.
  • This step will follow the “Method 1” (mentioned in the previous section) of creating a new Pivot Table.

excel pivot table method 2.5

Pivot Table Uses

You can download this Pivot Table Excel Template here – Pivot Table Excel Template

Let us understand the uses of the Pivot Table with the help of the below-mentioned case studies:

#1 – “Max” of Science marks by Maths marks

The table below provides the marks of the subjects Maths and Science in Column A and Column B, respectively. The given data is selected to create the Pivot Table in excel.

Now generate the Pivot Table report to find the maximum number which is present in the “Science marks column” by “Maths marks column” values.

excel pivot table method 2.1

Let us follow the steps shown in previous sections – “Method 1” or “Method 2” to generate the Pivot Table.

  • Now, drag “Maths” marks to the “Rows” field and “Science” marks to the “Values” field.

excel pivot table example 1.4

  • Right-click on the Pivot Table and select “Value Field Settings.”

excel pivot table example 1.1

  • Now select the “Max” option from the “Summarize value field by” option in the window.

excel pivot table example 1.2

  • The “Max” option returns the maximum number present in the Science marks (represented in Column B of the table below).

excel pivot table example 1.3

#2 – Average of Maths Marks Column

A list of Maths and Science marks is provided in Column A and Column B of the table below. Generate the Pivot Table report on the average number of the Maths marks (Column A).

EX 2.1

Select the data in Column A (Maths marks) to create the Pivot Table.

Let us follow the below steps to find the “Average” of the Maths marks in Column A.

  • Create a Pivot Table and drag “Maths” in the “Rows” field.

  • Right-click on the Pivot Table and select “Field Settings.”

EX 2.2

  • In the “Field Settings” window, select the “Custom” button under the tab “Subtotals & Filters.” 
  • Below this tab, choose the “Average” function.

EX 2.3

  • Now drag “Sum of Maths” in the “Values” field.

  • Right-click on the Pivot Table and select “Value Field Settings.”

EX 2.8

  • In the “Value Field Settings” window, go to the “Summarize value field by” tab. Then select the “Average” option.

EX 2.9

  • The Value Field is selected as “Average,” which returns the average value of 77.4 as a result in the Pivot Table Report.

EX 2.10

Similarly, other numeric operations can be performed on the given dataset. The dataset can also be filtered to fit the ranges as per the requirement.

Frequently Asked Questions (FAQs)

1. What are Pivot Tables used for?

A Pivot Table is used to summarise, sort, group, reorganize, and count the data in a Worksheet. It calculates the total and average of the data provided in a table. It allows the transformation of data from columns into rows and rows into columns, respectively. It also permits the grouping of data by any field or column. It also performs many advanced calculations on the data.

2. What is a Pivot Chart in Excel?

A Pivot Table is a built-in feature of Excel. It helps organize, visualize, and summarize the selected columns and rows in a spreadsheet. It helps to obtain a desired report on the given data.

3. What is the difference between Pivot Table and Pivot Chart?

Pivot Tables allow us to view the data summarized in a grid of horizontal and vertical columns. It is also used to extract information from a large dataset.

Pivot Charts are the visual representation of the Pivot Table data. It helps to summarize and analyze the datasets and patterns.

  • Pivot Table is a data processing technique in Excel.
  • Pivot Table is used to summarize data and extract information from a large dataset.
  • Pivot Table assists in making dashboards and reports based on a data source.
  • To create Pivot Table, click the “Tables” section under the “Insert” tab. The keyboard shortcut is – Press “ALT+D+P.”
  • Pivot Chart is a visual representation of Pivot Table, which allows us to summarize and analyze the datasets and patterns.

Recommended Articles

This has been a guide to Pivot Table in Excel. Here we discuss how to create a Pivot Table in Excel using the two methods along with examples and downloadable templates. You may also look at the below useful functions in Excel –

  • Pivot Table From Multiple SheetsPivot Table is a basic data analysis tool that calculates, summarizes, & analyses the data of a more extensive table. To create a Pivot Table from Multiple Sheets, you can use a few shortcuts & features as per the specified conditions. read more
  • Examples of Pivot TablePivot Table represents various statistical figures such as mean, median or mode. For example, data of any real estate project with different fields like type of flats, block names, area of the individual flats could be easily presented using pivot table.read more
  • Insert Pivot Table SlicerPivot Table Slicer is a tool in MS Excel to filter the data present in a pivot table. The data can be presented based on various categories as it offers a way to apply the pivot table filters that dynamically change the view of the pivot table data.read more
  • Filter Data using Pivot TableBy right-clicking on the pivot table, we can access the pivot table filter option. Another approach is to use the filter options available in the pivot table fields.read more

Reader Interactions

What is the Pivot Table in Excel?

A Pivot Table in Excel summarizes large amounts of data by organizing the data into small conclusive tables. Pivot Tables can help create reports and charts to understand trends. It also allows data filters to view just the details for areas of interest and explore more by changing the parameters.

It is known as a Pivot Table as it lets the user rearrange the rows and columns around the data to arrive at the desired summary. Users can also view total sales for different products, show product sales in percentages, get employee headcount in different departments, etc.

For example, when we create Pivot Table for the data below,

Pivot Table in Excel 1

The data is organized in the below form:

Pivot Table in Excel 2

Key Highlights

  • Pivot Table in Excel helps group complex data in multiple ways to draw meaningful conclusions easily.
  • We can rotate the data in the large data set to view it from different perspectives.
  • We cannot add, subtract or modify data while creating a Pivot Table.
  • We can use Pivot Tables for creating custom reports with appropriate formatting.

How to Create a Pivot Table in Excel?

You can download this Pivot Table Excel Template here – Pivot Table Excel Template

Example #1

The table below shows a list of auditors with the properties they marked as correct and incorrect. We want to count the properties according to their status using the Pivot Table.

Example #1

Solution:

Step 1: Select the data table and click on the Insert menu

Insert menu

Step 2: Click on Pivot Table

Pivot Table

A dialogue box PivotTable from table or range is displayed as shown below

PivotTable from table or range

Explanation:

Table/Range is the selected data table.

Next, we have to select whether we want the Pivot table in the New Worksheet or the Existing Worksheet.

Here, we select the Existing Worksheet.

Now, we have to specify the location (cell) for the Pivot Table. For this, click the desired cell and it will be displayed in the Location option in the dialogue box.

Now, click OK and the below Pivot Table will be created.

Pivot Table Fields

The above Pivot Table has no data. To enter data into it click anywhere on the Pivot table and we can see a Pivot Table Fields pane on the right side of the Excel Window as shown below

Pivot Table Fields 2

At the top, the Pivot Table has a list of fields (columns of the data table). At the bottom of the Pivot Table Fields pane, there are four areas (Rows, Values, Filters, and Columns) in which we need to place the data fields.

  • Rows: Data that is taken as a specifier
  • Values: Count of the data
  • Filters: Filters to select the desired data field
  • Columns: Values under different conditions

We can place the data fields into the desired area either by dragging them or by clicking the checkbox next to the data field.

Step 3: Drag the Auditor field to the area Rows, Property_ID to Values, and Status to Filters.

Auditor field

It results in the below table

Auditor field 2

The table shows the Total count (17) of the Property_IDs checked by the auditors.

Now, we want to count the number of Property_IDs marked as Correct

Step 3: Click on the Filter section dropdown in the table

Filter section

Step 4: Click on the Correct checkbox > Select Multiple Items > OK

Select Multiple Items

The result is displayed as shown below

result

The above table shows the total number of Property IDs marked as correct to be 13.

Step 4: Select the Incorrect option from the filter (dropdown) to get the below result

Incorrect option

The above table shows the total count of Incorrect Property IDs.

Example #2

The table below shows sales of Product 1, Product 2, Product 3, Product 4, Product 5, Product 6, Product 7, Product 8, and Product 9 in the year 2017 in quarters- Q1, Q2, Q3, and Q4. We want to find the total sales of all the products using the Pivot Table.

Example #2

Solution:

Here, we will use the alternative method to create the Pivot table. For that,

Step 1: Press the keys ALT + D + P on the keyboard

ALT + D + P

The PivotTable and PivotChart Wizard dialogue box opens up. It asks two questions-

  1. Where is the data you want to analyze?
  2. What kind of report do you want to create?

Step 2: Select the first option for both questions, i.e.,

  1. Microsoft Excel list or database and
  2. PivotTable

And click Next.

Microsoft Excel list or database

Note: By default, the first options for both questions are selected.

Now, Excel asks for a range of data. As we had already selected the data, therefore, it is prefilled.

Step 3: Click on Next

Click on Next

Now the dialog box asks us whether we want our pivot table in the same worksheet or a new worksheet. So,

Step 4: Select the New worksheet and click on Finish.

New worksheet

Now a Pivot Table is created with the PivotTable Fields pane on the right side of the Worksheet.

PivotTable Fields pane

Step 5: Drag the field Quarter in the area Columns, Year in Filters, Product in Rows, and Sales in Values.

field Quarter

The Pivot Table is created as shown below

Pivot Table is created

The above table shows the Total Sales of 9161.

Example #3

The below table shows a list of brands with their model, color, mileage, and price. We want to find the total price of all the Models of a Brand using the Pivot Table.

Example #3

Solution:

Step 1: Select the data table and click on Insert > Pivot Table

Insert - Pivot Table

The Pivot table from table or range dialogue box appears

Step 2: Choose Existing Worksheet, specify the location by clicking on the desired cell, and click OK.

Step 2

Note: The Table/Range is pre-filled as we had selected the data table.

The Pivot Table is created as shown below with the Fields pane on the right side.

Table or Range

Step 3: Drag the field Brand in the area Filters, Model in Rows, Color in Columns, and Price in Values.

field Brand

The Pivot Table is created as shown below with a total price of $ 60203.

$ 60203

Step 4: Click the dropdown (filter) and select Toyota > Select Multiple Items > OK

Toyota

Excel creates a Pivot Table showing the total price ($ 17770) for all the models of Toyota

$ 17770

Now, we want to view the total price for Chevrolet and Toyota together

Click the dropdown (filter) and select Chevrolet and Toyota > Select Multiple Items > OK

Chevrolet and Toyota

Excel creates a Pivot Table showing the total price ($ 29463) for all the models of Chevrolet and Toyota

$ 29463

How to Move a Pivot Table in Excel?

To move a Pivot Table,

  1. Select the Pivot Table > PivotTable Analyze > Move PivotTable

How to Move a Pivot Table in Excel

2. Specify the new location and click OK

Shortcuts for Pivot table in Excel

Below are the shortcuts we can use while working with Pivot Table

Shortcuts for Pivot table in Excel

Things to Remember

  • Pivot tables do not change the values in the database.
  • We can insert Pivot Tables either in the same worksheet or a new worksheet.
  • For convenience, we add pivot tables in a new worksheet.
  • We can create Pivot tables with up to 500,000 records.

Frequently Asked Questions (FAQ)

Q1) Why use a Pivot Table in Excel?

Answer: We can use Pivot Tables to track and analyze hundreds of thousands of data points with a compact table. We can use Pivot Tables to make a comparison, highlight a trend, or show relationships between parameters. Also, we can prepare multiple reports using the same Pivot Table.

Q2) Where is Pivot Table in Excel?

Answer: To locate the Pivot table,

Step 1: Select the data

Step 2: Click on Insert

Step 3: Select Pivot Table

Where is Pivot Table in Excel.png

Q3) Is there a limit to the number of rows in a Pivot Table in Excel?

Answer: A Pivot Table can display a maximum of 100,000 rows. Therefore, we cannot visualize more than 100k rows.

Q4) How many values can a Pivot Table handle?

Answer: Pivot tables can handle up to 1,048,576 items.

Q5) What are the disadvantages of Pivot table in Excel?

Answer: The disadvantages of the Pivot table are:

  1. We cannot use the aggregate function with the Pivot table
  2. Pivot tables do not support conditional formatting.
  3. The Pivot Table does not work if there are blank rows or columns

Recommended Articles

The above article is a guide to creating a Pivot Table in Excel. For more such information, EDUCBA recommends the below-given articles.

  1. PowerPivot in Excel
  2. Pivot Table Formula in Excel
  3. VBA Refresh Pivot Table
  4. Excel Delete Pivot Table

Понравилась статья? Поделить с друзьями:
  • What is modules in vba excel
  • What is mis in excel
  • What is mirr in excel
  • What is minus in excel
  • What is min in excel