Excel Pivot Table Example (11 Different Case)

What Is a Pivot Table in Excel?

A Pivot Table is an amazing data analysis tool of Microsoft Excel. It can analyze data according to our desired requirements. It can summarize data in several types of categories and subcategories. The Pivot Table also has all the features of a conventional Excel table.


How to Create a Pivot Table in Excel

We are going to use a dataset that has 11 shipment information of an electric supplier. Our dataset is in the range of cells B5:H15.

Steps:

  • Select the range of cells B4:H15.
  • In the Inset tab, click on the drop-down arrow of the PivotTable option from the Table group and select the From Table/Range option.

Creating a Pivot Table From insert tab of Excel

  • A small dialog box called Pivot Table from table or range will appear.
  • Set the destination of the Pivot Table. For our dataset, we chose the New worksheet option.
  • Click OK.

Defining the data range for creating the Pivot Table

  • A new worksheet will be created, and the Pivot Table will appear in front of you.

  • Input the fields in the four areas of the Pivot Table to get the value in it.

Inputting fields in different Pivot Table area


How Does a Pivot Table Work?

In the Pivot Table Field window, there are four areas. They are Filters, Columns, Rows, and Values. Above them, we have the field name list where all the column headings of our main table remain listed. We can input a field in those areas once to display the corresponding data in our Pivot Table. Insertion of a field in the different areas results in different outputs in our Pivot Table.

If we placed the Region and Category in the Rows area and the Revenue field in the Value area, the Pivot Table shows us a result like the image shown below.

Output in Pivot Table for combination of field

If we just take any of a field from the Rows area to the Columns area, we will notice the output will be completely changed and the Pivot Table will display a new output.

Output in Pivot Table for second combination of field


Excel Pivot Tables: 11 Examples

Consider a dataset of 11 deliveries of an electric product supplier. The information on every shipment is in the range of cells B5:H15. We will show you several types of Pivot Tables.


Example 1 – Inserting the Fields into Analyze Data in Pivot Table

We will add the fields Quantity, Cost, and Revenue in our Pivot Table against the Category.

Steps:

  • As we want to display all of those data with respect to the Category field, at first, we will place the Category field.
  • Drag the Category field from the field list into the Rows area.

  • Drag the Quantity field in the Value area. The value of the quantity will be shown in column B.

Inputting the fields in the areas of the Pivot Table

  • Input the Cost and Revenue field in the Value area.
  • You will get all the fields in the Pivot Table.

Inserting Fields into Analyze Data in Pivot Table

Read More: A Pivot Table Example in Excel with Real Data


Example 2 – Nesting Multiple Fields in a Single Section

We are going to show the nesting fields in a single area. In our Pivot Table, we have the Revenue value with the Category field.

We will input the Region field in the Rows area to form a nested filed situation.

Steps:

  • Drag the Region field from the field name list into the Rows area above the Category field.
  • You will see that the region name will show first, and inside every region, the corresponding category will display.

Nesting Multiple Fields in a Single Section of Excel Pivot Table


Example 3 – Placing a Slicer for a Pivot Table

Steps:

  • In the Pivot Table Analyze tab, select the Insert Slicer option from the Filter group.

Insert Slicer in Excel Pivot Table from the Analyze tab

  • A small dialog box titled Insert Slicers will appear.
  • Select the field name for which you want to insert the Slicer. We checked the Region field.
  • Click OK.

  • A Region Slicer will appear.

Created new Slicer

  • Select any of the regions, and you will see the corresponding category in the Pivot Table.

Placing Slicer for Excel Pivot Table Example


Example 4 – Sorting Data

We want to sort our Pivot Table from the highest revenue to the lowest revenue.

Steps:

  • Click on the drop-down arrow located at the bottom corner of the Row Labels.
  • Select the More Sort Options option from the Context Menu.

Choosing suitable option to sort data in Pivot Table

  • The Sort (Category) dialog box will appear.
  • Choose the Descending (Z to A) by filed and change the filed option Category to Sum of Revenue.
  • Click OK.

Defining criteria for data sorting in Pivot Table

  • The highest revenue cell is displayed at the top and the lowest one at the bottom.

Sorting Data in Excel Pivot Table Example


Example 5 – Filtering Data According to a Requirement

Steps:

  • Click on the drop-down arrow allocated at the bottom corner of the Row Labels.

  • The Context Menu will appear.
  • Check those entities that you want to keep. We checked only for TV and Air Condition to see their data.
  • Click OK.

Choosing the entities for filtering in Pivot Table

  • You will get the data of only those two items.

Filtering Data According to Requirement in Excel Pivot Table


Example 6 – Updating Data in a Pivot Table

We will add a new data series to our dataset. The range of our dataset is in the range of cells B5:B16.

Steps:

  • In the Pivot Table Analyze tab, click on the drop-down arrow of the Change Data Source and select the Change Data Source option from the Data group.

Opening Change Data Range dialog box to update data in Pivot Table

  • The Change Pivot Table Data Source will appear.
  • Select the new data range in the Table/Range field.
  • Click OK.

Changing new data range

  • The Pivot Table is updated with the new data.

Updating Data in Excel Pivot Table Example


Example 7 – Getting the Top 3 Values from a Table

Steps:

  • Click on the drop-down arrow allocated at the bottom corner of the Row Labels.

  • The Context Menu will appear.
  • Select the Top 10 option from the Value Filters group.

Choosing proper option to get top 3 data

  • Another dialog box called Top 10 Filter (Category) will appear.
  • To get the top 3, reduce the number from 10 to 3.
  • Set the last field as the Sum of Cost.
  • Click OK.

Defining criteria for top 3 data

  • You will get three items.

Getting Top 3 Values from Excel Pivot Table


Example 8 – Data Grouping with a Pivot Table

We keep the Region field in the Rows area. We know that New York and New Jersey are two neighboring states. So, we want to keep them in a group.

Steps:

  • Select the range of cells A5:A6.
  • Right-click and select the Group option.

Selecting proper option for grouping two data

  • Both regions will be assigned to a new group and the others will be shown as an individual group.

Data Grouping with Pivot Table Example

Read More: Pivot Table Test for Interview


Example 9 – Analyzing Data with a Pivot Chart

Steps:

  • In the Pivot Table Analyze tab, select the Pivot Chart option from the Tools group.

Inserting a Pivot Chart

  • The Insert Chart dialog box will appear.
  • Choose a chart. We chose the Clustered Column chart for a better comparison of our dataset.
  • Click OK.

  • The chart will appear on the sheet.
  • Modify the chart according to your requirements and add necessary items from the Chart Elements icon.

Analyzing Data with Pivot Chart from Pivot Table

Read More: Excel Data for Pivot Table Practice


How to Refresh a Pivot Table

We changed a category name from Blander to iPod, but we need to update the pivot table.

Steps:

  • Go to the Pivot Table Analyze tab.
  • Select Refresh and choose the Refresh option from the Data group.

Refreshing Pivot Table by Refresh command

  • Blender will be replaced with iPod.

Refresh Pivot Table to update data

Read More: What Is the Use of Pivot Table in Excel


How to Move a Pivot Table to a New Location

Steps:

  • Go to the Pivot Table Analyze tab.
  • Click on the Move Pivot Table from the Action group.

Selecting Move Pivot Table command to move the Table

  • The Move Pivot Table dialog box will appear.
  • Set the destination of your Pivot Table. We want to move one column to the right, so we chose the Existing Worksheet option and selected cell B3 as a cell reference.
  • Click OK.

  • The whole Pivot Table will shift one column.

Move Pivot Table to New Location


How to Remove a Pivot Table

Steps:

  • In the Pivot Table Analyze tab, click on the drop-down arrow of Select, then choose the Entire Pivot Table option from the Action group.

Selecting suitable command to remove the Excel Pivot Table Example

  • You will get the complete table selected.

  • Press the Delete key from your keyboard.
  • The Pivot Table will disappear from the sheet.

Removed Pivot Table from Excel worksheet


Download the Practice Workbook


<< Go Back to What is Pivot Table in Excel | Pivot Table in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Kawser Ahmed
Kawser Ahmed

Kawser Ahmed is a Microsoft Excel Expert, Udemy Course Instructor, Data Analyst, Finance professional, and Chief Editor of ExcelDemy. He is the founder and CEO of SOFTEKO (a software and content marketing company). He has a B.Sc in Electrical and Electronics Engineering. As a Udemy instructor, he offers 8 acclaimed Excel courses, one selected for Udemy Business. A devoted MS Excel enthusiast, Kawser has contributed over 200 articles and reviewed thousands more. His expertise extends to Data Analysis,... Read Full Bio

10 Comments
  1. great course I am on an exploration journey thanks

  2. Hi, Kawser,
    For PT8, the title asks for the savings account whereas the example is filtering for only checkings. Otherwise great tutorial.
    Many thanks!
    Yun

  3. hi kawser, thank you for your work its wonderfull!! i learned a lot cheers! more power!

  4. Good day Kawser,

    Thank you a lot. Found what I was looking for.

    Regards,
    Zayniddin

  5. Thank you very much for the exercise on Pivot Table. It was quite revealing and interesting. I learnt a lot from it.

  6. Great tutorial, thanks for your help.

  7. Thank you for shearing your knowledge. I learnt a lot from it. Your shearing is more improve my skill.

    • Dear Yar Zar Htun,

      You are most welcome. We are glad that through ExcelDemy you are improving your skill.

      Regards
      Shamima Sultana
      Project Manager | ExcelDemy

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo