The Wayback Machine - https://web.archive.org/web/20240828110719/https://www.geeksforgeeks.org/pivot-tables-in-excel/
Open In App

How to Create a Pivot Table in Excel: A Step-by-Step Guide

Last Updated : 07 Jul, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

A PivotTable is a helpful tool in Excel that lets you calculate, summarize, and analyze your data. It helps you see comparisons, patterns, and trends. How PivotTables work can vary slightly depending on the version of Excel you are using.

Creating a Pivot Table in Excel can transform the way you analyze and summarize data. If you’re dealing with large datasets, Pivot Tables provide a dynamic and powerful tool to effortlessly organize and extract meaningful insights. Whether you’re managing sales figures, tracking project timelines, or analyzing survey responses, Pivot Tables help you make data-driven decisions quickly.

how-to-create-a-pivot-table-in-excel-(1)

How to Create a Pivot Table in Excel

In this article, we’ll explore the process of creating a Pivot Table in Excel, ensuring you maximize your efficiency and productivity. Additionally, we’ll touch on how to create a Pivot Table in Google Spreadsheet, offering a comprehensive understanding of this tool across different platforms. Let’s start learning how to create a Pivot Table in Excel, and how to make a Pivot Table in Google Spreadsheet to streamline your data analysis and reporting tasks.

What is Pivot Table in Excel

A Pivot table is a summary of your data package. The word ‘Pivot‘ in the Pivot table means to rotate the data in Excel to view it from a different perspective. Creating a Pivot table doesn’t mean adding, subtracting, or changing the data, it simply means reorganizing it so you can easily work with useful information.

Data Format Tips:

  • Use clean, tabular data for the best report.
  • Better to organize your data in columns, instead of rows.
  • Ensure all columns have headers, with a single row of unique, non-blank labels for each column. Avoid double rows of headers or merged cells.
  • Format your data as an Excel table (select anywhere in your data and then select Insert > Table from the ribbon).
  • If you have complicated or nested data, use Power Query to transform it (for example, to unpivot your data) so it is organized in columns with a single header row

What are Pivot Tables used for

Pivot tables are tools meant to simplify the process of summarizing large datasets efficiently. They enable users to gain insights, visualize, and analyze numerical data comprehensively.

Below are some pivot table uses:

  1. Comparing Sales Totals of Different Products
  2. Showing Product Sales as Percentages of Total Sales
  3. Combining Duplicate Data
  4. Getting an Employee Headcount for Separate Departments
  5. Adding Default Values to Empty Cells

How to Create a Pivot Table

In this section, we’ll walk you through the steps to create a pivot table in Excel, making it simple for you to organize and analyze your data effectively.

Step 1: Open MS Excel and Select a Cell

Step 2: Go to the Insert tab

 Create a Pivot Table in Excel

Go to the Insert Tab

Step 3: In the Tables group, click on the Pivot table tool

 Create a Pivot Table in Excel

Create Pivot Table >> Ok

Step 4: Fill the Dialog Box

A dialog box would open where we have to fill in the two choices for the data to be analyzed and the place where we wish to have the pivot table. After filling in the options, click on OK.

Note: By default the data location of the pivot table will be a new worksheet.

Step 5: In the new sheet, we can see the pivot table and other options

 Create a Pivot Table in Excel

Pivot Table Created

How to Build a Pivot Table Report

On the left side of the sheet, a new empty pivot table has been created where the summary would be shown. On the right side, we can see the FIELD NAME which are the headers of the columns of our data set. FIELD NAME is to be dragged to empty boxes i.e. Filters, Columns, Rows, and values to show their corresponding values in the Pivot Table.

Let’s drag the FIELD NAME into the boxes and see their effects individually. 

 Create a Pivot Table in Excel

Drag the Field Name

Step 1: Add Pivot Table Fields

Values sum up all the entries in the FIELD NAME dragged in it. Here, as Sales are dragged here, our pivot table shows the sum of all the sales that took place. 

 Create a Pivot Table in Excel

Drag the Fields between areas

Step 2: Sum of Sales Appeared

Scre Create a Pivot Table in Excelenshot20210515at11215PMmin

Sum of Sales Appeared

Step 3: Add More Fields

We can add as many FIELD names as we require in Values. Individual sums would be shown then.

 Create a Pivot Table in Excel

Add More Fields

Step 4: Drag to Get Sum

Dragging fields into values will give you the sum of values as a result.

 Create a Pivot Table in Excel

Sum Calculated

Step 5: Returned to Total Count

If the entities in the column can’t be summed, it will give us the total count of the entries present in that column.  Here as Country and Product do not contain numeric values, it returned the total count of each column.

 Create a Pivot Table in Excel

Total Count

Step 6: Drag Fields into Values

Dragging Fields into Values.

 Create a Pivot Table in Excel

Drag Fields into Values

Step 7: Count Not Found

In the below image, you can find the Count of the Values.

 Create a Pivot Table in Excel

Count Not Found

Step 8: Data Gets Grouped

The data in the pivot table gets grouped (Row-Wise) by the Field Names dragged to the Rows Area. 

In this example, we have grouped the sales by the countries. 

 Create a Pivot Table in Excel

Data Gets Grouped

Step 9: Fields dragged to Rows

In the below image, the fields are dragged to Rows.

 Create a Pivot Table in Excel

Fields dragged to Rows

We can drag as many Fields as we require in this region.

How to Create Pivot Table Columns Area in Excel

Creating Pivot Table using the Column Area in Excel

Step 1: Use Discount Band

The data in the pivot table gets grouped by(Column-Wise) by the Field Names dragged to Columns Area. As here, row-wise, our data is grouped by Countries and column-wise, it is grouped by Discount Band. 

 Create a Pivot Table in Excel

Use Discount band

Step 2: Fields Dragged to Columns

The Fields are dragged to Columns in the below image.

 Create a Pivot Table in Excel

Fields Dragged to Columns

This area can accommodate many Fields. 

Filter Area in Excel

The filter is an important feature in the pivot table. using which we can filter out the data based on the Field dragged into it.

Step 1: Filter the Total Sales

Here, we have filtered the total sales based on one particular product that is only that product is considered while calculating the sales

 Create a Pivot Table in Excel

Filter the Total Sales

Step 2: Apply Features

You can also apply many features to the Product fields as shown below.

 Create a Pivot Table in Excel

Apply features

Step 3: Final Output

Below is the final output of the above steps. In this way, using pivot tables, a summary of the data is achieved in the form of a matrix. There are many other tools and features of the Pivot Tables which can be explored. 

 Create a Pivot Table in Excel

Final Output

How to Refresh a Pivot Table in Excel

Refreshing your pivot table is crucial to keep your data up-to-date. This simple step ensures that any changes or additions to your original dataset are reflected in your pivot table. Here’s how to do it:

Refresh the Pivot Table data manually

To manually refresh the data in a Pivot Table, follow these steps in Excel:

Step 1: Click inside the Pivot Table

Step 2: Go to the “Data” tab

Step 3: Click on Refresh Button

Look for the “Refresh” button in the “Data Tools” group. It may also be labeled as “Refresh All” if you have multiple Pivot Tables in your workbook.

 Create a Pivot Table in Excel

Click on Refresh Button

Refreshing a Pivot Table automatically when opening the workbook in Excel

You can also automatically refresh data.

Step 1: Click inside the Pivot Table

Step 2: Go to Pivot Table

Go to the “PivotTable Analyze” or “Options” tab on the Excel ribbon, depending on your Excel version.

Step 3: Go for Option group

Look for the “Options” group, and within that group, locate and click on “Options” (or “PivotTable Options” in older versions).

Step 4: Select the Data Tab

In the PivotTable Options dialog box that appears, select the “Data” tab.

Step 5: Check the Box

Check the box that says “Refresh data when opening the file.”

Step 6: Click “Ok”

Click “OK” to save your changes and close the dialog box.

 Create a Pivot Table in Excel

Click “Ok”

How to Copy a Pivot Table

Copying a pivot table in Excel is a simple and useful skill, especially when you want to use the same layout with different data or in another part of your workbook. This section will guide you through the easy steps to duplicate your pivot table quickly and efficiently, so you can continue analyzing data without starting from scratch each time.

Here are the steps to copy a Pivot Table:

Step 1: Select the entire pivot table

Step 2: Copy the pivot table.

Step 3: Choose the destination

Step 4: Paste the pivot table.

 Create a Pivot Table in Excel

Paste the pivot table

How to Delete a Pivot Table

Here are the steps to delete a Pivot Table:

Step 1: Select a Pivot Table

 Create a Pivot Table in Excel

Select the Pivot Table

Step 2: Press the “Delete” key

 Create a Pivot Table in Excel

Click on Delete button

Step 3: Table Deleted

How to Sort a Pivot Table

Here are the steps to sort a Pivot Table:

Step 1: Select the column or row

 Create a Pivot Table in Excel

Select a Column or Row

Step 2: Sort in ascending or descending order.

 Create a Pivot Table in Excel

Click on Sort button to Sort Pivot Table

Tips & Tricks For Excel Pivot Tables

  • Let Excel suggest Pivot Table layouts based on your data. Go to Insert > Recommended PivotTables.
  • Group dates by month, quarter, or year for better trend analysis.
  • Group items manually to create custom categories.
  • Add slicers for a visual and interactive way to filter your Pivot Table data.
  • Use multiple slicers for more granular control over your data views.
  • Add calculated fields to perform custom calculations within your Pivot Table without altering the source data.
  • Use complex formulas for sophisticated data analysis.

Conclusion

Creating a Pivot Table in Excel is an essential skill for anyone looking to effectively analyze and summarize large sets of data. By following the simple steps of selecting your data, inserting the Pivot Table, and organizing your fields into rows, columns, and values, you can transform raw data into meaningful insights. As we’ve seen, pivot tables allow you to easily organize, summarize, and interpret large sets of information, making them indispensable for anyone dealing with data analysis. Now that you understand the steps to create, build, design, improve, refresh, copy, delete, and sort pivot tables, you can start leveraging this essential tool to make better-informed decisions and streamline your data analysis processes.

Also Read

How to Create a Pivot Table in Excel – FAQs

How do I create a PivotTable in Excel?

Follow the the steps given below:

  • Select Your Data
  • Go to the Insert tab
  • Click on PivotTable
  • Create the PivotTable

How do I create a PivotTable with rows and columns?

To create Pivot Table with rows and columns follow the steps given below:

  • Select Your Data
  • Go to the Insert tab
  • Drag the rows
  • Drag the Columns

What is a PivotTable in Excel used for?

A PivotTable in Excel is used for:

  • Summarizing Data
  • Analyzing Data
  • Data Exploration
  • Creating Reports
  • Filtering Data

How do I create a pivot chart from Excel data?

Here are the steps to create a pivot table from the Excel data:

  • Go to the Insert tab
  • Click on PivotTable
  • Customize the PivotChart

What is Pivot Table in Excel Formula?

Here are some of the Pivot table formulas:

  • Sum: ‘=SUM(Sales)’
  • Average: ‘=AVERAGE(Sales)’
  • Count: ‘=COUNT(Quantity)’
  • Product: ‘=PRODUCT(Quantity)’


Similar Reads

How to Create Pivot Chart from Pivot Table in Excel using Java?
A Pivot Chart is used to analyze data of a table with very little effort (and no formulas) and it gives you the big picture of your raw data. It allows you to analyze data using various types of graphs and layouts. It is considered to be the best chart during a business presentation that involves huge data. To add a pivot chart to an Excel workshee
4 min read
How to Create Excel Pivot Table Calculated Field with Examples
You can add calculated fields to a pivot table using your own unique algorithms that add up to other pivot fields. A calculated field has some restrictions, but it gives the pivot tables in your Excel worksheet a strong tool. What is a Pivot Table Calculated Field in Excel“Pivot Table calculated field” is an option to include more data or calculati
3 min read
How to Create Pivot Table in Excel using Java?
A pivot table is needed to quickly analyze data of a table with very little effort (and no formulas) and sometimes not everyone has time to look at the data in the table and see what’s going on and use it to build good-looking reports for large data sets in an Excel worksheet. Let's discuss a step-by-step proper explanation to create a pivot table
5 min read
How to Create a Gantt Chart in Excel: A Step-by-Step Guide
Mastering how to create a Gantt chart in Excel is crucial for efficient project management. This visual tool helps you plan, schedule, and track tasks, ensuring projects stay on track. Whether managing a small project or a complex initiative, Excel Gantt charts significantly enhance productivity and organizational efficiency. In this guide, you'll
6 min read
How to Create a Graph in Excel: A Step-by-Step Guide for Beginners
Anyone who wants to quickly make observations and represent them graphically should know how to create graphs with Excel. Whether it is the preparation of business analysis papers, academic research documents or financial reports among other things, learning how to make graphs in Excel can significantly improve the way you present information deriv
8 min read
How to Remove Pivot Table But Keep Data in Excel?
In this article, we will look into how to remove the Pivot Table but want to keep the data intact in Excel. To do so follow the below steps: Step 1: Select the Pivot table. To select the table, go to Analyze tabSelect the menu and choose the Entire Pivot Table. Step 2: Now copy the entire Pivot table data by Ctrl+C. Step 3: Select a cell in the wor
1 min read
How to Delete a Pivot Table in Excel?
A pivot table is a tool in Excel that allows you to quickly summarize data in the spreadsheet. When it comes to deleting a Pivot Table, there are a few different ways you can do this. The method you choose will depend on how you want to delete the Pivot Table. 1.Delete the Pivot Table and the Resulting Data. Steps to delete the Pivot table and the
3 min read
Refresh Pivot Table Data in Excel
In the Pivot data table, data can be grouped based on Dates, Numbers, and Text values. In the case of dates, we can group dates by months or year, months by years, etc. At any time, data for the PivotTables in your workbook can be refreshed using the Refresh button. You can also refresh data from a source table in the same or a different workbook.
2 min read
How to Remove Old Row and Column Items from the Pivot Table in Excel?
Pivot table is one of the most efficient tools in excel for data analysis. If you are using pivot tables frequently, then you will find even after deleting the old data from the data source, it remains in the filter drop-down of the pivot table. We will learn, how to remove the old row and column items from the pivot table in excel. Reason for not
4 min read
How to Add and Use an Excel Pivot Table Calculated Field?
Excel pivot tables are one of its most helpful features. They are utilized to summarize or aggregate large quantities of data. The data can be summarized using the average, the count, or other statistical approaches. It summarizes a large amount of data into a few rows and columns. They make it simple to explore the data from various views and angl
4 min read
How to Troubleshoot and Fix Excel Pivot Table Errors?
Power Pivot is an Excel add-in, a data modeling technology that helps the user to create data models, establish relationships, and create calculations. However, it is possible to encounter a few errors during the process. here in this article, we will discuss some of the Excel Pivot Table Errors that may occur and how we can fix them. Usually, Exce
7 min read
How to Apply Conditional Formatting in a Pivot Table in Excel
One of the most useful ways to customize the pivot table formatting is using Conditional Formats. Conditional formatting rules can be applied to Pivot tables just like they can be applied to normal data ranges. So by using conditional formatting, we can highlight the cells with a certain color depending on the cell's value. Conditional FormattingWh
8 min read
How to Sort a Pivot Table in Excel
Excel is a powerful tool to store, organize, and visualize large volumes of data. A cell, a rectangular block is used to store each data unit. It can be used to visualize data using a graph plot or to get insights from data using formulas and functions. Generally, account professionals use this tool for financial accounting but everyone can use it
5 min read
How to Prevent Grouped Dates In Excel Pivot Table?
We may group dates, numbers, and text fields in a pivot table. Organize dates, for instance, by year and month. In a pivot table field, text elements can be manually selected. The selected things can then be grouped. This enables you to rapidly view the subtotals in your pivot table for a certain group of items. The built-in choices for grouping da
3 min read
Table and Chart Combinations in Excel Power Pivot
For data exploration, visualization, and reporting, Power Pivot offers a variety of Power PivotTable and Power PivotChart combinations. A Power PivotChart is a PivotChart that was made using the Power Pivot window and is based on the Data Model. Despite sharing certain functionality with Excel PivotChart, it offers additional features that give it
3 min read
Top 10 Excel Pivot Table Keyboard Shortcuts
Using programs like Microsoft Excel, pivot tables are handy for highlighting key data. They let you "pivot," changing data direction for fresh insights. By grouping similar data and applying operations like total or average, pivot tables summarize large datasets efficiently. However, dealing with massive data can be tedious. Knowing keyboard shortc
10 min read
How to Hide Zero Values in Pivot Table in Excel?
One of Microsoft Excel's most important features is the pivot table. You might be aware of this if you have worked with it. It provides us with a thorough view and insight into the dataset. You can do a lot with it. The pivot table might include zero values. In this lesson, you will learn how to hide zero values in the pivot table using relevant ex
5 min read
Pivot Table Slicers in Excel
Slicers are the visual representation of filters. By using a slicer, we can filter our data in the pivot table by just clicking on the type of data we want. Slicers are found in the Analyze tab of the pivot table tools. We have an option called Insert Slicer and on clicking it, we have to select the column on the basis of which we need to filter ou
8 min read
How to Flatten Data in Excel Pivot Table?
Flattening a pivot table in Excel can make data analysis and extraction much easier. In order to make the format more usable, it's possible to "flatten" the pivot table in Excel. To do this, click anyplace on the turn table to actuate the PivotTable Tools menu. Click Design, then Report Layout, and then, at that point, Show in Tabular Form. This wi
7 min read
How to Make a Calendar in Excel: Step by Step Guide
Looking to boost your productivity? Learning how to create an Excel Calendar isn't just practical—it's a game-changer for organizing your schedule effectively. Whether you're wondering how to make a calendar in Excel, seeking the perfect Excel calendar format, or aiming to streamline Excel calendar creation processes, this post has you covered. We'
7 min read
How to Calculate Time in Excel: Step by Step Guide
Time management is crucial in many tasks, and Excel's powerful functions can help you calculate and analyze time efficiently. Whether you're tracking project durations, managing schedules, or analyzing time data, Excel offers several methods for calculating time differences and handling time values. This guide will walk you through these methods to
7 min read
How to Insert a Checkbox in Excel: A Step-by-Step Guide
In today's fast-paced environment, efficiency is paramount. Checkboxes are like tiny helpers in your spreadsheets, letting you create to-do lists, track tasks, and manage projects with just a click. Adding checkboxes in Excel is straightforward and can be done with just a few simple steps, whether you're using Excel 2010, 2016, Office 365, or Excel
10 min read
How to Swap Columns in Excel: Step-by-Step Guide
Swapping columns in Excel can be tricky, but with the right techniques, you can easily rearrange your data for better organization and analysis. In this article, we’ll show you multiple methods to swap columns in Excel, including drag-and-drop, copy-paste, using macros, and more. Table of Content 4 Easy Methods to Swap Columns in ExcelHow to Swap C
7 min read
How to Freeze Rows and Columns in Excel: Step-by-Step Guide
Do you struggle to keep important headers or data visible while scrolling through large Excel sheets? In this article, we’ll show you how to freeze rows in Excel, so you can lock critical information at the top while navigating through your data. Mastering Excel’s freeze panes feature can significantly boost your productivity and enhance your data
8 min read
How to Create Calculated Columns in Power Pivot in Excel
Power Pivot is an advanced data modeling tool that aims to perform advanced calculations on large datasets. Calculated columns are one of its features that makes it highly popular and help users derive new data by applying custom formulas to existing data columns. So, in this article, we will understand what are calculated columns, how to create th
5 min read
Pivot Cache in Excel
Excel automatically makes a copy of the source data and saves it in the Pivot Cache when you build a PivotTable. It is a part of the workbook and is linked to the Pivot Table, even though you can't see it. When you make adjustments to the Pivot Table, it uses the Pivot Cache rather than the data source. Excel stores the Pivot Cache in its memory. W
5 min read
How to Group and Ungroup Pivot Chart Data Items in Excel?
A pivot chart is the visual representation of a pivot table in Excel. Pivot charts and pivot tables are connected with each other. Pivot chart are much more flexible than normal chart because Pivot Chart is linked to a PivotTable. Filters, sorts, and data rearrangements applied to Pivot Table are reflected on the chart. Steps to create Pivot chart
2 min read
How to Install Power Pivot in Excel?
Power Pivot is a data modeling technique that lets you create data models, establish relationships, and create calculations. We can work on large data sets, build extensive relationships, and create complex (or simple) calculations using this Power Pivot tool. Power Pivot is one of the three data analysis tools available in Excel, the other two too
3 min read
Analyzing Large Datasets With Power Pivot in Microsoft Excel
The setting for Power Pivot… If you are a successive Excel client, then you are most likely acquainted with turn tables. They are utilized for sorting out speedy bits of knowledge from modest quantities of information and can likewise be transformed into straightforward charts. In any case, even Excel has its impediments. While joining tables, cont
5 min read
Hierarchies in Excel Power Pivot
A Hierarchy is a system that has many levels from highest to lowest. When we have related columns in a table, then analyzing them with fixed attributes is difficult. Excel Power Pivot gives us the power to set a hierarchy to which data can be filtered and analyzed correctly according to one's needs. In this article, we will learn how to create hier
7 min read