Open In App

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

Last Updated : 17 Jun, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

If you’ve ever needed a powerful way to summarize and analyze large datasets in Microsoft Excel, then learning how to create a pivot table is essential. Pivot tables are one of the most useful features in Excel. They are used to summarize or aggregate lots of data. The summarization of the data can be in the form of average, count, and other statistical methods. It converts lots of data into a few rows and columns of summary. They make it very easy to view the data from different perspectives and angles and are great for exploring data. 

This step-by-step guide will take you through the entire process, from selecting your data to customizing your table like building, designing, copying, deleting, and shortening pivot table, ensuring you can make the most of Excel’s strongest data-handling features.

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.

Some of the main functions of a Pivot Table are:

  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: Select any cell inside the data set of which a pivot table has to be created.

Step 2: Go to the Insert tab

Create a Pivot Table in Excel

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

Create a Pivot Table in Excel

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

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

1. Values Area in Excel

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 ExcelCreate a Pivot Table in Excel

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

Create a Pivot Table in Excel

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

Create a Pivot Table in Excel

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

Dragging Fileds into Values.

Create a Pivot Table in Excel

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

Create a Pivot Table in Excel

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

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

Create a Pivot Table in Excel

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

2. Columns Area in Excel

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

The Fields are dragged to Columns in the below image.

Create a Pivot Table in Excel

This area can accommodate many Fields. 

3. 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. 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

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

Create a Pivot Table in Excel

Below is the final output of the above steps.

Create a Pivot Table in Excel

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. 

How to Design and Improve Pivot Table

Designing and improving your pivot table in Excel can make your data analysis even more powerful and insightful. This section will guide you through customizing your pivot table to better suit your needs. We’ll cover how to format your data for clarity, apply filters for more precise analysis, and adjust the layout to make your reports user-friendly and professional.

Here are the steps to design and improve a Pivot Table:

Step 1: Choose the Right Data: Use data that has the information you need, with clear headers.

Step 2: Make the Pivot Table: Follow the earlier steps to create it

Step 3: Pick Rows and Columns: Decide which data to show as rows and columns.

Step 4: Use Filters: Add filters to focus on specific parts of the data.

Step 5: Do Math: Use built-in or custom calculations for insights.

Step 6: Make it Look Good: Adjust fonts, colors, and formatting.

Step 7: Sort and Group: Organize data the way you want.

Step 8: Dig Deeper: Right-click to see more details.

Step 9: Update Data: If it changes, refresh the table.

Step 10: Add Charts: Include visuals for better understanding.

Step 11: Label Clearly: Make sure everything is easy to understand.

Step 12: Test and Adjust: Review and improve as needed.

Step 13: Explain How to Use: If sharing, provide instructions.

Step 14: Add Slicers: These help with data navigation.

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:

1. 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 that you want to refresh to select it.

Step 2: Go to the “Data” tab on the Excel ribbon.

Step 3: 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.

Step 4: Click the “Refresh” button.

 Create a Pivot Table in Excel

2. Refreshing a Pivot Table automatically when opening the workbook in Excel

Step 1: Click inside the Pivot Table to select it

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

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

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

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

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

 Create a Pivot Table in Excel

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

How to Delete a Pivot Table

Here are the steps to delete a Pivot Table:

  • Step 1:Select the pivot table you want to delete.
  • Step 2: Press the “Delete” key

How to Sort a Pivot Table

Here are the steps to sort a Pivot Table:

  • Step 1: Select the column or row you want to sort
  • Step 2: Sort in ascending or descending order.

Conclusion

In conclusion, making a pivot table in Excel is a great way to understand big sets of data. 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. By following the steps in this guide, you can organize and see your data better, helping you make smart decisions. 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

Is there any inbuilt functions option to display data in the values area of the pivot table?

No, There is n inbuilt function to display data in the values area of the pivot table you can display the text fields in rows and columns areas, and the count of the data can be easily calculated.

What are the advantages of the Pivot table?

A pivot table can be used to summarize, analyze, explore, and present data in a summary format so that better results can be obtained. Pivot Charts can be a  beneficial part of the pivot table, allowing for comparison easily.

How to delete the pivot table?

Click on the Pivot table. On the Analyze Table, and then pick the entire pivot table and then pick the entire pivot table and set delete all the content.

What are the advantages of using a Pivot table?

A pivot table is an easy and interactive way to quickly summarize large amounts of data. A pivot table can be used to analyze numerical data in detail. The pivot table is specially designed for querying large amounts of data in many simple ways.

How can we group Dates in Pivot Table?

To group dates in an Excel pivot table:

  • Right-click on any date in your pivot table
  • Select “Group” from the context menu, and then choose the desired time period (e.g., months, quarters, years) for grouping.

How can we add a Calculated Field in a Pivot Table?

To add a Calculated Field in an Excel pivot table, follow these steps:

  • Select any cell within your pivot table to activate the PivotTable Tools on the ribbon.
  • Go to the “PivotTable Analyze” tab, click “Fields, Items, & Sets,” and then select “Calculated Field.”
  • In the “Insert Calculated Field” dialog box, enter a name for your field, define the formula using the fields available in your pivot table, and then click “OK.”

How can we remove Grand Total from a Pivot Table?

To remove the Grand Total from a Pivot Table in Excel, follow these steps:

  • Click anywhere inside the Pivot Table to activate the PivotTable Tools on the ribbon.
  • Go to the “Analyze” or “Design” tab (depending on your Excel version).
  • Click on “Grand Totals” off to the side.
  • Choose “Off for Rows and Columns” to remove the grand totals.



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 Graph in Excel: Step-by-Step Guide
The charts or graphs are the visual representation of data in both rows and columns. They are used to analyze the trends and patterns in the datasets. For example, If we want to analyze the sales of different courses for a specific period we can easily do this with the help of charts and get the result of queries such as months having a maximum num
7 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 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 Flatten Data in Excel Pivot Table?
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 will isolate the line names and make it simpler to investigate information. Excel Power
5 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