You are on page 1of 5

1

Using Excel for Problem Solving - Part II - Pivot Tables


Learning
Objectives

Move beyond sorting & filtering with Excel Pivot Tables


Viewing analysis results with Pivot Charts

Excel includes a special data mining feature called the Pivot Table to easily analyze large
amounts of data in tables. The power of a Pivot Table is the ability to view the data in
different ways until you find the answer youre seeking.
A Pivot Table analyzes, summarizes, and manipulates data in large lists, databases,
worksheets, or other collections. It is called a PivotTable because fields can be moved
within the table to create different types of summary lists, providing a pivot.
Pivot Tables &
Charts

Pivot tables are highly flexible in terms of how you can arrange and summarize your data;
the ability to dynamically arrange your data is where they get the name "pivot;" you can
turn the same data around & look at it in various ways to identify relationships between the
variables.
Pivot Charts are interactive graphical representations of the data in the Pivot Table to let
you visually display the data in a graph. A Pivot Chart is always associated with a single
Pivot Table that has a corresponding layout. When the position of a field is changed in the
table, the corresponding field in the chart also moves.
Although the data that appear in PivotTables look like any other worksheet data, the data
in the data area of the PivotTable cannot be directly entered or changed. Each column or
field in the source data becomes a Pivot Table field that summarizes multiple rows of the
original data. The PivotTable is linked to the source data so the output in the cells of the
table are read-only data.

Special Features Key Benefits:


Querying large amounts of data in user-friendly way
Subtotaling numeric data, summarizing data, and creating custom calculations
Expanding and collapsing levels of data to facilitate focus
Pivoting or moving rows to columns or columns to rows to see different views of the
data
Formatting (number, alignment, font, etc.) can be changed

A variety of computational options such as SUM, COUNT, AVERAGE, MIN, and MAX
may be used

Before working with a Pivot Table or Pivot Chart, think carefully about what youre trying
to show, as this affects the design of the data table. Your starting data list should have:
Data Table
Design

Pivot Table
Terms

Data field
headings are
dropped into the
display space as
soon as checked.
You may then
move them
around, or your
may drag them
into the
descriptive data
boxes in the
lower right-hand
section of the
field window

descriptive column headings


no blank rows
horizontal rows (records) with values for each of the column headings (city, state,
region)
numeric values under a column to provide quantitative summaries of the data
Row field - Row fields have a row orientation in a PivotTable output and are
displayed as row labels. These appear in the ROW area of a PivotTable report layout
(i.e. magazine names)
Column field - Column fields have a column orientation in the PivotTable output and
are displayed as column labels. These appear in the COLUMN area of a PivotTable
report layout. (summary criteria, i.e. region)
Data field - fields from a list or table containing summary data in a PivotTable, such
as numeric data (i.e. statistics, sales amounts). These are summarized in the DATA
area of a PivotTable report layout. (sales $)
Page field - page fields filter out the data for other items and display one page at a
time in a PivotTable report (time element, i.e. month or quarter)

Building a
PivotTable

Pivot Table
Practice

Completed
PivotTable for
Sales

The PivotTable command from the Insert Menu set up basic PivotTable layout, resulting in
a visual breakdown of the data in the Excel list or database table. A layout diagram with the
labels PAGE, COLUMN, ROW, and DATA appears. The next step is to select & drag the field
items onto the PivotTable grid or into one of the processing boxes in the lower right-hand
corner of your layout page.
1. Use the practice workbook ProblemSolving_Data.xls (same as for Excel Sorts &
Filters), and copy the data table to a new worksheet tab.
2. Click any cell in the list. Now the active cell is within the list, and Excel knows to use
the data in the Excel list to create a PivotTable.
3. Click the Insert tab, then click the PivotTable button in the Tables group.
4. The Create PivotTable dialog box opens. In the Select a table or range box, make
sure you see $A$1:$E$97 & choose New Worksheet. Click Ok. Your layout may look
a bit different depending upon which version of Excel you are working with.
5. Using the PivotTable Field List, (pop-up containing data source fields) drag the
Month button to the "Filter" box criteria in the lower right Options box. This this
also called the page field. It operates like the row and column fields but provides a
filterable third dimension to the data. It allows another variable to be added to the
PivotTable without necessarily viewing all its values at the same time.
6. Drag the Region data field to the COLUMN Label area. The column field is another
variable used for comparison.
7. Drag the Magazine data field to the ROW Label area. A row field in a PivotTable is a
variable that takes on different values.
8. Click the Sale checkbox & it should be added automatically to the DATA area (or
summation values). The data field is the variable that the PivotTable summarizes
(default is sum, but you can right-click on this entry & change it). Your PivotTable
should now look like that below.
9. You can use the Month filter to see sales data for specific months vs the default of
all.

Switching Field
Variables

The power of PivotTables becomes clear when you experiment with your data by viewing it
with different values as the Page, or Filter option, and swapping rows & columns. Your final
choice depends upon what business questions you are trying to answer. For example, you
might switch Month & Magazine, showing sales by Month, and for all or selected Magazine
titles.
You might also move Month to the Column Headings, and display Magazine titles down the
left-hand rows. Whichever field is in the Page, or filter area, you may view selected criteria,
or leave it as the default of "all." Set up your pivot table so the output makes sense to the
viewer.
To create a Pivot Chart from your
Pivot Table:

Add a Pivot
Chart

Formatting your
Pivot Table

1. Click inside the Pivot Table


2. Click a chart type in the
Charts group on the Insert
tab.
3. Select any type of chart
(except scatter, bubble or
stock)
4. Your chart appears on the
same page by default
5. In Office 2013, a nice
formatting feature lets you
add or edit the chart title &
change features right next
to the pivot chart.
1. Right-click anywhere in the
PivotTable to display a
shortcut menu & select
PivotTable Options
2. Format your output
currency
3. Click on the Design tab,
Design Gallery to choose an
output style, such as
banded rows or columns to
help define your summary
data.

You may add or modify fields with the PivotTable Field List
The layout section at the bottom can be used to arrange or reposition fields as Report Filter,
Customizing the
Row Labels, Column Labels, and Values
PivotTable
You may sort, filter, & change sub-total options within the PivotTable

Excel does not automatically update Pivot Tables & charts, so after any changes, right-click
in any cell & choose "Refresh" to update your changes.

Combo Charts

Microsoft
Sources &
Videos

Depending on the type of data you have, you can easily show multiple axis levels by using a
combo chart. This would allow you to show both units & sales $ on the same chart. Take
care with this type, however, to insure your chart still tells a readable story. Experiment &
see how your output may be displayed. Always edit the default title to make it professional.
For more discussion about when to use spreadsheet sorting or Pivot tables, check out this
blog & related demonstration videos:
http://blogs.office.com/b/microsoft-excel/archive/2011/01/18/excel-table-orpivottable.aspx

If you need the practice, work through the steps in this document, using the same practice
What Happens
file in BB/Weekly Folders/.
Next?
Complete ProbSlvg 2 - Basic Excel Pivot Tables
Last updated: 8/11/2014

You might also like