Excel Miracles 27
Excel Miracles 27
Chapter
27
Pivot Tables
A pivot table report allows you to analyze and summarize a million rows of data in Excel 2007
without entering a single formula.
Pivot tables are incredibly exible, and there are hundreds of different styles of reports you can
create. This chapter will show you how to create a basic pivot table in Excel 2007 and then show
off some of the new features available. Note that a complete book on pivot tables would be larger
than this volume. If you want to learn about pivot tables, the best-selling pivot table book is Pivot
Table Data Crunching by Michael Alexander and Bill Jelen.
Figure 27.2
Initially, a blank pivot
table has no elds.
Pivot Tables
114
4. To include a eld in the pivot table summary, simply checkmark the eld in the PivotTable
Field List.
5. To create the report shown in Figure 27.3, click the Region eld, the Customer eld, and then
the Revenue eld.
Figure 27.3
Excel uses the eld types
to determine where to
display the elds.
6. When a pivot table has multiple elds in the Row Labels area, you can use the Collapse or
Expand buttons to produce summaries of the data.
Figure 27.4
After collapsing, the
customer information
is temporarily hidden.
Pivot Tables
115
Grab the Product eld from the top half of the PivotTable Field List, drag it, and drop it in the
Column Labels section at the bottom of the PivotTable Field List. Excel creates a summary with
Region and Customer down the side and Products across the top.
Figure 27.5
Product elds stretch
across the columns at
the top of the report.
Figure 27.6
It is unintuitive, but a powerful
menu appears when you hover
and the click in this section of
the pivot table.
Pivot Tables
116
The menu offers choices where you can sort or lter the eld. Figure 27.7 shows the various options
available in the Label lters for the Customer eld.
Figure 27.7
A variety of value,
date, and label lters
is available.
Say that you want to sequence the customers in high-to-low sequence and to show only the top 12
customers. Follow these steps.
1. Click the Customer eld in the top half of the Pivot Table Field List. Use the dropdown arrow
to open a menu.
2. Choose More Sort Options.
3. In the Sort (Customer) dialog, choose to sort descending by Sum of Revenue.
Figure 27.8
You are sorting one
eld (Customer) by the
results in another eld
(Revenue).
117
Pivot Tables
Pivot Tables
118
Never group a eld only by Month. Always include Months and Years in the Grouping dialog.
(Otherwise, Excel will add January of 2007 and January of 2008 into a single value called
January!)
Figure 27.12
Group daily dates up
to months, quarters,
and/or years.
Grouping the Date eld actually adds a new virtual eld to the PivotTable Field List. Move Years
from Row Labels to Column Labels to produce a report showing year-to-year comparisons.
Figure 27.14
December 2008 is up over
December 2007.
119
Pivot Tables
Pivot Tables
120
Once you have a eld in the Report Filter section, you can quickly replicate the report for every
value in the Filter eld. Follow these steps:
1. Add at least one eld to the Filter area of the report.
2. On the PivotTable Tools Options ribbon, look for the Options icon on the left side of the ribbon.
Do not press the Options button, but click the dropdown arrow to the right of the button.
3. From the dropdown, choose Show Report Filter Pages.
Figure 27.18
Show Report Filter
Pages is a powerful
command.
4. Choose to Show all report lter pages of Region and click OK.
Figure 27.19
If you have multiple
elds in the Filter area,
you have to select just
one here.
Excel quickly adds new worksheets for each value in the Region dropdown.
Figure 27.20
Excel added ve new worksheets
with copies of the pivot table in less
than a second. Notice the worksheet
tabs at the bottom of this gure.
***