Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
06-01-Pivot Table Recap-Start.xlsx455.4 KB 06-01-Pivot Table Recap-Complete.xlsx
759.3 KB 6.01 pivot-table-recap - Exercise.docx
76.7 KB Exercise - PivotTable Recap.xlsx
78.7 KB 6.01 pivot-table-recap - Exercise solution.docx
85.8 KB Exercise Solution - PivotTable Recap.xlsx
109.9 KB
Quick reference
PivotTable Recap
A recap on how to create a basic PivotTable.
When to use
We use PivotTables when we want to easily organize and analyze large datasets.
Instructions
PivotTables are one of the best tools in Excel for analyzing and making sense of large amounts of data. PivotTables allow us to take thousands of rows of data and organize them into a dynamic table which we can manipulate in different ways to extract the results we need.
It's important to ensure that our data is clean before we attempt to analyze it with PivotTables. We also recommend formatting the dataset as an Excel table first and giving it a meaningful name.
In this example, our data is already formatted as a table called 'SalesData'.
Create a PivotTable
- Click anywhere in the data.
- From the Insert tab, in the Tables group, click PivotTable.
- From the PivotTable from table or range dialog box, ensure the Table/Range is correct and select New Worksheet.
- Click OK.
This will create a blank PivotTable report on a new worksheet.
Notice the PivotTable Fields pane on the right-hand side and the new contextual ribbons: PivotTable Analyze and Design.
The PivotTable Fields Pane
The PivotTable Fields pane shows the column headings from our dataset in the top half and then 4 field areas below: Filters, Columns, Rows and Values.
We can drag and drop any of the column headings into any of the areas at the bottom to build our PivotTable report in different ways.
Analyzing Data
When thinking about which fields to drag into which areas, we need to think about what type of analysis we want to do. What questions do we need answered?
Maybe we want to see a summary of the 'Total Revenue' by 'Country'.
- Drag the Country field to the Rows area.
- Drag the Total Revenue field to the Values area.
The report will show a list of all countries and a sum of the total revenue.
Pivoting the Fields
The best thing about PivotTables is their flexibility. If we decide we need to do a different analysis, we simply need to pivot the fields or remove them.
For example, maybe now we want to see the 'Total Costs' by 'Country'. We can drag the 'Sum of Total Revenue' field out of the Values area to remove it and replace it with the 'Total Costs' field.
We now want to see a report that shows the total costs by country and item type.
- Drag the Item Type field into the Columns area.
We can stack fields on top of each other in the same area. For example, we could move the 'Item Type' field above the 'Country' field in Rows to achieve a different report layout.
- Drag Sales Channel to the Columns area.
- Drag the Sales Channel field to the Filters area.
We can now filter our PivotTable by Online or Offline sales.
- Drag the Sales Channel field back to Columns.
Basic PivotTable Formatting
Number Formatting
We can apply number formatting so numbers in the PivotTable display as we want them to.
- Right-click on any number in the PivotTable.
- Click Number Format.
- Choose Currency format and ensure the decimal places are set to 2.
Turn off Grand Total
We can choose if we want to display the Grand Total in our PivotTable. By default, the Grand Total is turned on.
- From the Design tab, in the Layout group, click the drop-down next to Grand Totals.
- Choose Off for Rows and Columns.
Rename Rows and Column Labels
- Double-click in the column label field and type a new name.
PivotTable Styles
We can make our PivotTable more interesting to look at by adding a PivotTable style.
- Click in the PivotTable.
- From the Design tab, in the PivotTable Styles group, click the drop-down to expand the Styles gallery.
- Choose a PivotTable style.
- Customize the style by making selections in PivotTable Style Options.
Hints & tips
- If you want Excel to recommend a Pivot Table for you, remember to click Recommended Pivot Tables to see some suggestions.
Lesson notes are only available for subscribers.