Charts and Pivot Tables in Excel 2010

 Charts and
PivotTables
Excel2010
Unit5Module2
Diocese of St. Petersburg Office of Training [email protected] Page left intentionally blank
Table of Contents
About Charting ................................................................................................................................ 1 Charting Rules .............................................................................................................................. 1 Elements of a chart ...................................................................................................................... 2 Guidelines for Charting ................................................................................................................ 2 Choosing the correct chart format .............................................................................................. 2 Maintaining simplicity ............................................................................................................. 2 Maintaining consistency .......................................................................................................... 2 Using labels .............................................................................................................................. 3 Pie Charts ..................................................................................................................................... 3 Limiting the number of slices ‐ ................................................................................................ 3 Using labels for slices ............................................................................................................... 4 Focusing attention ................................................................................................................... 4 Enhancing the chart ................................................................................................................. 4 Bar Graphs ................................................................................................................................... 4 Limiting the scale ..................................................................................................................... 5 Line Graphs .................................................................................................................................. 6 Using contrast .......................................................................................................................... 6 Limiting multiple lines ............................................................................................................. 7 Designing Your Worksheet for Charting ...................................................................................... 7 Recommended: Range Names .................................................................................................... 8 Creating a Basic Chart .................................................................................................................. 9 Apply a predefined chart layout ............................................................................................ 10 Change the layout of chart elements manually ........................................................................ 11 Resizing and Moving the Chart .................................................................................................. 13 To resize a chart ........................................................................................................................ 13 To move the chart to a new worksheet in the workbook. .................................................... 14 Creating Pivot Tables ..................................................................................................................... 15 Inserting a PivotTable ................................................................................................................ 15 Choosing Fields and Grouping Data .......................................................................................... 18 Overview of the Pivot Table Tools Tabs .................................................................................... 20 Diocese of St. Petersburg
9/5/2014
Working with PivotTables and PivotCharts ................................................................................... 20 Changing the Data Displayed and Refreshing the PivotTable ................................................... 21 Applying a Style to Your Pivot Table .......................................................................................... 23 Creating a Pivot Chart from a Pivot Table ................................................................................. 26 Creating a Pivot Chart from Data .............................................................................................. 27 What are slicers? ................................................................................................................... 29 Using slicers ............................................................................................................................... 30 Disconnect a slicer ................................................................................................................. 31 Delete a slicer ........................................................................................................................ 31 Grouping and Outlining Data ......................................................................................................... 32 Grouping Data ........................................................................................................................... 33 Adding Subtotals ....................................................................................................................... 34 Outlining Data ............................................................................................................................ 35 Viewing Grouped and Outlined Data ........................................................................................ 36 Diocese of St. Petersburg
9/5/2014
About Charting
Charts are objects on your worksheet that can be moved, resized, and deleted
without affecting your worksheet. If the chart is placed on top of information, the
information will not be modified or lost.
Charting Rules
Excel follows seven basic rules for creating charts with the Chart Wizard.
Understanding these rules can help avoid frustration and reduce the steps necessary
for creating charts. Once the chart is created, you can modify it to meet your needs.
1. Excel does not automatically add a chart title to your chart based on the first
row of selected information. A chart title can be added during the creation
process or later
2. Excel does not automatically add a chart subtitle to your chart based on the
second row of selected information. A subtitle can be added after the chart is
created
3. Blank rows and columns in your information are not ignored. Excel will leave
a blank bar or pie slice for every blank row or column in your information
4. If the data contains more rows than columns, Excel will plot the data by
column. The first column becomes the X-axis labels; the balance of the
columns are the data series. The first row becomes the legend's labels
5. If the data contains more columns than rows, Excel will plot the data by row.
The first row becomes the X-axis labels; the balance of the rows are the data
series. The first column becomes the legend's labels
6. If the data contains an equal number of rows and columns, Excel defaults to
plot the data by rows but gives you the option to plot by columns
7. If only numeric data is selected, Excel follows rules 4 and 5
Diocese of St. Petersburg
pg. 1
9/5/2014
Elements of a chart
Guidelines for Charting
The ability to create effective charts, whether for oral presentations or printed text,
is an important skill for anyone involved with projecting numeric information.
Research has shown that visual depictions of data communicate faster than words or
lists of numbers. Knowledge of effective charting methods allows you to present
numerical information in a visually appealing way. Essentially, a chart's effectiveness
depends on its ability to generate for the viewer an immediate sense of orientation
and access to information.
Choosing the correct chart format
Chart formats are designed to portray certain types of information; therefore, choose
the correct chart format for your information.
Maintaining simplicity
Clarifying information is the main goal of creating a chart, so complicated charts only
serve to make your information less clear.
Maintaining consistency
When creating several charts, use a design grid. This grid will help you maintain a
consistent chart format, eliminating distractions for your audience.
Diocese of St. Petersburg
pg. 2
9/5/2014
Using labels
Effective use of labels that are created using legible typefaces will assist your
audience in understanding a chart's information.
Each of these design factors is important, but the choice of chart format comes first.
For this reason, the following sections discuss the design considerations for three of
the most common chart formats.
Pie Charts
Pie charts are best used to compare parts of a whole; in other words, they help
divide a group into components. Some factors to keep in mind when creating pie
charts include the following:
Studem ts by Program
Morning Star
Elementary RE
Middle School
Life Teen
Little Rock
LPMI
Theology on Tap
Limiting the number of slices - Keep the number of slices to a minimum by
combining smaller categories into one. Too many slices will hinder interpretation by
making your pie chart appear complicated and cramped; it will also create difficulties
for labeling.
Diocese of St. Petersburg
pg. 3
9/5/2014
Using labels for slices
Try to place labels within slices whenever possible; this will help you create pie
charts that are both clear and readable.
Focusing attention
If necessary, draw your audience's attention to the particular slices you are
discussing, perhaps by "exploding" it to make it appear separate from the pie or by
selecting a dominant color or pattern.
Enhancing the chart
Consider enhancing the appearance of the pie chart, perhaps by adding
perspective. Keep in mind, however, that three-dimensional pies can sometimes
make certain slices appear larger than they really are; thus, your pie chart may be
misleading.
Bar Graphs
Bar graphs work best to emphasize the contrast between quantities. Two types of
bar graphs can be used: vertical and horizontal. Vertical bar graphs work well for
comparing quantities at different times, while horizontal bar graphs compare
different quantities when time is not an important consideration. For example, a
graph showing student enrollment by year would probably work best in the vertical
format, while a graph showing current participation in faculty organizations would be
most effective in the horizontal format. Some design considerations to keep in mind
when creating either type of bar graph include the following:
Diocese of St. Petersburg
pg. 4
9/5/2014
Studem ts by Program
Theology on Tap
LPMI
Little Rock
Life Teen
Studemts by Program
Middle School
Elementary RE
Morning Star
0
5000
10000
15000
Studem ts by Program
14000
12000
10000
8000
Studemts by Program
6000
4000
2000
Ta
p
I
on
LP
M
og
y
Th
eo
l
M
or
ni
ng
St
El
ar
em
en
ta
ry
M
R
id
E
dl
e
Sc
ho
ol
Li
fe
Te
en
Li
ttl
e
R
oc
k
0
Limiting the scale
Make sure your bar graph is kept within a reasonable scale; in other words, try to
avoid showing three quantities of similar size and one quantity that is drastically
larger or smaller.
Diocese of St. Petersburg
pg. 5
9/5/2014
Line Graphs
Line graphs best indicate the relationship of one variable to another, and they can be
created using either straight or curved lines. Which type of line graph you use
depends on the type of information you wish to convey: straight-line graphs show
specific observation points, while curved-line graphs show general trends. Some
design considerations to keep in mind when creating either type of line graph include
the following:
Studem ts by Program
14000
12000
10000
8000
Studemts by Program
6000
4000
2000
I
Ta
p
on
LP
M
og
y
Th
eo
l
M
or
ni
ng
El
St
em
ar
en
ta
ry
M
R
id
E
dl
e
Sc
ho
ol
Li
fe
Te
en
Li
ttl
e
R
oc
k
0
25000
20000
15000
1999
2009
10000
5000
0
Morning Star
Elementary RE Middle School
Life Teen
Little Rock
LPMI
Theology on
Tap
Using contrast
Make sure to use lines with sufficient contrast; in other words, create a line that
is bold enough to clearly appear to your audience but thin enough to still convey
specific information.
Diocese of St. Petersburg
pg. 6
9/5/2014
Limiting multiple lines
When using multiple lines to compare trends, keep the number of lines to three
or less. Comparing more than three trends on the same line graph can create
confusion for your audience, especially if your graph is not in color.
Designing Your Worksheet for Charting
You have two basic options for setting up your worksheet. First, you can design your
worksheet so the information to be charted is close together. Second, you can create
a summary section for charting.The right option for you will often depend on what
the worksheet is designed to do. Often worksheets are designed to track
information; later on, charting becomes a secondary purpose. With this type of
worksheet, a summary section may be the easiest. You can summarize the detailed
data in a different area on your worksheet and make it much easier for charting.
A summary section will include the information to be charted in a contiguous group.
The more complete the summary section, the less work you will have to do when
creating your chart. Based on the Charting Rules, an organization similar to the
following graphic will make it easiest for automatic charting. While this setup may
not always be appropriate, keep in mind the format can reduce the amount of
adjustments required for your charts.
This sample worksheet section was used to create the following chart. Aside from
telling Excel to create a chart and indicating where the chart was to appear, the
default setup created the chart.
Diocese of St. Petersburg
pg. 7
9/5/2014
Charts can be enhanced by modifying the individual chart elements or by adding a
new data series. Notice that the chart title and subtitle are not included in the chart.
Excel requires that these be added after the chart is created or during the Chart
Wizard process.
Recommended: Range Names
Before you create your chart, you should create a range name to represent the data
on your worksheet. Range names refer to specific groups of cells and are often used
for cell references in functions, charting, and printing. Using range names when
creating a chart rather than using the cell references will reduce the chance of error
and allow you to add data to your chart in the future
Diocese of St. Petersburg
pg. 8
9/5/2014
Creating a Basic Chart
1. Select the data you want
to chart
2.
On the Insert tab in the
Charts group click the chart type
you want
to use and
then click
a chart sub
type.
3. Use the
Chart Tools
Layout tab
to add chart
elements
such as titles and data labels.
Diocese of St. Petersburg
pg. 9
9/5/2014
After you create a chart, you can instantly change its look. Instead of manually
adding or changing chart elements or formatting the chart, you can quickly apply a
predefined layout and style to your chart. Excel provides a variety of useful
predefined layouts and styles (or quick layouts and quick styles) that you can select
from, but you can customize a layout or style as needed by manually changing the
layout and format of individual chart elements.
Apply a predefined chart layout
1. Click anywhere in the chart that you want to format by using a predefined
chart layout.
2. This displays the Chart Tools, adding the
Design, Layout, and Format tabs.
3. On the Design tab, in the Chart Layouts
group, click the chart layout that you want to
use.
Note When the size of the Excel window is reduced, chart layouts will be
available in the Quick Layout gallery in the Chart Layouts group.
Tip To see all available layouts, click More
Diocese of St. Petersburg
pg. 10
.
9/5/2014
Apply a predefined chart style
1. Click anywhere in the chart that you want to format by using a predefined
chart style.
2. This displays the
Chart Tools, adding
the Design,
Layout, and Format tabs.
3. On the Design tab, in the Chart Styles group, click the chart style that you
want to use.
Note When the size of the Excel window is reduced, chart styles will be available in
the Chart Quick Styles gallery in the Chart Styles group.
Change the layout of chart elements manually
1. Click the chart element for which you want to change the layout, or do the
following to select it from a list of chart elements.
2. Click anywhere in the chart to display the Chart Tools.
3. On the Format tab, in the Current Selection
group, click the arrow in the Chart Elements
box, and then click the chart element that you
want.
Diocese of St. Petersburg
pg. 11
9/5/2014
4. On the Layout tab, in the Labels, Axes, or Background group, click the
chart element button that corresponds with the chart element that you
selected, and then click the layout option that you want.
Note The layout options that you select are applied to the chart element that you
have selected. For example, if you have the entire chart selected data labels, will be
applied to all data series. If you have a single data point selected, data labels will
only be applied to the selected data series or data point.
Diocese of St. Petersburg
pg. 12
9/5/2014
Resizing and Moving the Chart
Picture handles appear around the chart when you select it. These handles help when
resizing the chart manually. Make sure these handles are present when you need to
move a chart.
To resize a chart
1. Click on the chart to select it. Notice the border around the chart. Each corner
has three small dots.
2. Select one of the
corners and drag the
picture. Notice the
cursor changes to a
diagonal line with
arrows at both ends.
You can make it
smaller or bigger,
depending on which
direction you drag.
3. Release the mouse when the chart is the desired size. Notice that Excel may
rearrange the graphic elements for the best look and fit.
Diocese of St. Petersburg
pg. 13
9/5/2014
To move the chart to a new worksheet in the workbook.
1. Select the chart.
2. Select the Chart Tools Design tab.
3. Select the
Move Chart
tool.
Excel displays the
Move Chart dialog
box.
4. Select New
Sheet.
5. Give the new worksheet a new name, if desired.
6. Select OK.
Excel creates a
new worksheet
in the workbook
(notice the tabs
at the bottom).
The chart has
also been resized
to fill the
worksheet.
Diocese of St. Petersburg
pg. 14
9/5/2014
Creating Pivot Tables
PivotTables allow you to analyze numeric data in depth. You can use this tool to
answer unanticipated questions about data. PivotTables are interactive, crosstabulated Excel reports that summarize and analyze data. In this module, you’ll learn
how to insert a chart. You’ll gain an understanding of the PivotTable Tools tab. You’ll
also learn how to choose fields for your table and group data.
Inserting a PivotTable
A PivotTable report helps you to summarize, analyze, explore, and present summary
data. A PivotChart report can help you visualize PivotTable report summary data to
make comparisons or see patterns and trends. When you insert a PivotChart, you are
also automatically inserting a PivotTable.
You won’t be able to see the results of the table just yet. In the next topic, we’ll talk
about choosing the fields for the table and grouping the data.
Use the following procedure to insert a PivotTable.
1. Place your cursor somewhere in the data you want to analyze.
2. Select the Insert tab from the Ribbon.
3. Select PivotTable.
Excel displays the Create PivotTable dialog box.
Diocese of St. Petersburg
pg. 15
9/5/2014
4. Excel automatically provides a range of cells based on your selection. You can
change the table or range if desired.
5. Select a location for the PivotTable. You can have Excel create a new
worksheet or select one of the existing sheets.
6. Select OK.
Diocese of St. Petersburg
pg. 16
9/5/2014
Excel displays the PivotTable and the Field List for you to begin choosing your fields
and grouping data (discussed in the next topic).
Diocese of St. Petersburg
pg. 17
9/5/2014
Choosing Fields and Grouping Data
When you add a PivotTable or PivotChart to your worksheet, the table or chart is
blank at first. You must choose the fields you want to display on the chart. The
PivotTable Field List pane makes it easy to select the fields you want on the chart.
Use the following procedure to add fields to the PivotTable report.
1. Check the box next to a field listed in the PivotTable Field list to include it in
the report. The default location where fields are added are as follows:

Nonnumeric fields are added to the Row Labels.

Numerical fields are added to the Values area.

Date and time values are added to the Column Labels.
The bottom of the PivotTable Field List pane includes four areas:

Report Filter

Axis Fields (categories or row labels)

Legend Fields (column labels)

Values
Use the following procedure to group the data.
1. Right click on a field label in the PivotTable Field List and select one of the
options from the context menu.
Diocese of St. Petersburg
pg. 18
9/5/2014
2. You can also simply drag the fields from one area to another. You can even
drag a field from the top portion of the pane to one of the bottom areas.
Diocese of St. Petersburg
pg. 19
9/5/2014
Overview of the Pivot Table Tools Tabs
You may have noticed the PivotTable Tools tabs that appear when you inserted your
chart. These contextual tabs are used throughout Office 2010. The appropriate tab
appears, depending on which type of object you are using.
TOOLS
TABS FOR WORKING WITH
PIVOTTABLES
Working with PivotTables and PivotCharts
In this module, you’ll learn more about PivotTables and Pivot Charts. You’ll learn how
to change the data displayed and refresh the chart. You’ll learn how to apply a style
to your table. You’ll also learn how to create a PivotChart, both from an existing
PivotTable and straight from data. Finally, we’ll look at some real-life examples of
using PivotTables and Pivot Charts.
Diocese of St. Petersburg
pg. 20
9/5/2014
Changing the Data Displayed and Refreshing the PivotTable
PivotTables are meant to be interactive, so Excel makes it easy to change the data.
You can select the Refresh tool at any time to update the table.
Use the following procedure to refresh the PivotTable after making a change to the
data.
1.
2.
3.
4.
Return to the worksheet containing the PivotTable.
Click somewhere on the PivotTable.
Select the Options tab from the Ribbon.
Select Refresh.
Use the following procedure to change the data source.
1. Select the Options tab from the Ribbon.
2. Select Change Data Source.
Excel returns to the worksheet of the source data and highlights the current data
source. It also displays the Change PivotTable Data Source dialog box.
3. Highlight the new data area on the worksheet.
Diocese of St. Petersburg
pg. 21
9/5/2014
4. Select OK.
5. Excel opens the new PivotTable. Select and group the fields as desired.
Diocese of St. Petersburg
pg. 22
9/5/2014
Applying a Style to Your Pivot Table
Excel includes many different predefined styles to update the look of your PivotTable.
Use the following procedure to apply a style to the PivotTable.
1. Select the Design tab of the Ribbon.
2. Select the small arrow in the PivotTable Styles area to see the PivotTable
Style gallery.
3. Select an option to apply the style.
Diocese of St. Petersburg
pg. 23
9/5/2014
Shown here is the New PivotTable Style dialog box.
Diocese of St. Petersburg
pg. 24
9/5/2014
Shown here is the formatting options for one of the table elements.
Diocese of St. Petersburg
pg. 25
9/5/2014
Creating a Pivot Chart from a Pivot Table
Click anywhere in the PivotTable for which you want to add a chart.
1. Select the Options tab from the Ribbon.
2. Select PivotChart.
Excel displays the Insert Chart dialog box.
Diocese of St. Petersburg
pg. 26
9/5/2014
3. Select the desired type of chart and select OK.
Creating a Pivot Chart from Data
Use the following procedure to insert a PivotChart.
1. Place your cursor somewhere in the data you want to analyze.
2. Select the Insert tab from the Ribbon.
3. Select the arrow under PivotTable. Select PivotChart.
Diocese of St. Petersburg
pg. 27
9/5/2014
Excel displays the Create PivotTable with PivotChart dialog box.
4. Excel automatically provides a range of cells based on your selection. You can
change the table or range if desired.
5. Select a location for the PivotChart. You can have Excel create a new
worksheet or select one of the existing sheets.
6. Select OK.
Diocese of St. Petersburg
pg. 28
9/5/2014
Excel displays the PivotChart and the Field List for you to begin choosing your fields
and grouping data.
7. Add fields to view the chart.
What are slicers?
Slicers are easy-to-use filtering components that contain a set of buttons that enable
you to quickly filter the data in a PivotTable report, without the need to open dropdown lists to find the items that you want to filter.
When you use a regular PivotTable report filter to filter on multiple items, the filter
indicates only that multiple items are filtered, and you have to open a drop-down list
to find the filtering details. However, a slicer clearly labels the filter that is applied
and provides details so that you can easily understand the data that is displayed in
the filtered PivotTable report.
Slicers are typically associated with the PivotTable in which they are created. A slicer
typically displays the following elements:
Diocese of St. Petersburg
pg. 29
9/5/2014
1.
A slicer header indicates the category of the items in the slicer.
2.
A filtering button that is not selected
indicates that the item is not included in the
filter.
3.
A filtering button that is selected indicates
that the item is included in the filter.
4.
A Clear Filter button removes the filter by
selecting all items in the slicer.
5.
A scroll bar enables scrolling when there are
more items than are currently visible in the
slicer.
6.
Border moving and resizing controls allow you to change the size and location
of the slicer.
Using slicers
There are several ways to create slicers to filter
your PivotTable data. In an existing PivotTable,
you can:
Create a slicer that is associated with the
PivotTable.
Create a copy of a slicer that is associated with
the PivotTable.
Use an existing slicer that is associated with another PivotTable.
Because each slicer that you create is designed to filter on a specific PivotTable field,
it is likely that you will create more than one slicer to filter a PivotTable report.
Diocese of St. Petersburg
pg. 30
9/5/2014
After you create a slicer, it appears on the worksheet alongside
the PivotTable, in a layered display if you have more than one
slicer. You can move a slicer to another location on the
worksheet, and resize it as needed.
To filter the PivotTable data, you simply click one or more of the
buttons in the slicer.
Disconnect a slicer
1.
Click anywhere in the PivotTable report for which you want to disconnect a
slicer.
2.
This displays the PivotTable Tools,
adding an
Options and a Design tab.
3.
On the Options tab, in the Sort & Filter
group, click
the Insert Slicer arrow, and then click Slicer Connections.
4.
In the Slicer Connections dialog box, clear the check box of any PivotTable
fields for which you want to disconnect a slicer.
Delete a slicer
Do one of the following:
1.
Click the slicer, and then press DELETE.
2.
Right-click the slicer and then click Remove <Name of slicer>.
Diocese of St. Petersburg
pg. 31
9/5/2014
Grouping and Outlining Data
Excel has some powerful tools to help you quickly group and outline your data. In
this module, you’ll learn how to group your data. You’ll also learn about adding
subtotals to a list of data. This module explains outlining data. It also explains how
to view grouped and outlined data.
Diocese of St. Petersburg
pg. 32
9/5/2014
Grouping Data
You can create groups of data to help you work with large worksheets of data, or
anytime that you want to provide some structure to your worksheet or facilitate
outlining tools. A group simply creates an object out of selected rows or columns.
This object can be expanded or collapsed.
Use the following procedure to create a group.
1. Select the range of cells you want to group.
2. Select the Data tab from the Ribbon.
3. Select Group.
Diocese of St. Petersburg
pg. 33
9/5/2014
Adding Subtotals
The Subtotals feature automatically creates groups and subtotals the related data
according to your specifications. You can subtotal data according to any of your
column headers on a sheet of data.
Use the following procedure to add subtotals.
1. Make sure that
each column of
data has a label
in the first row.
It must also contain similar facts. Don’t
include any blank rows or columns.
2. Select the Data tab from the Ribbon.
3. Select Subtotal.
4. In the Subtotal dialog box, select the locations
for the subtotals from the At each change in
drop down list.
5. Select the function to use in the subtotal fields
from the Use Function drop down list.
6. Check the boxes that correspond to
your column headers for which column(s)
to subtotal.
7. Check the boxes to indicate the
other formatting options by checking or
clearing the Replace current subtotals,
Page
break
between
groups,
and
Summary below data.
8. Select OK.
Diocese of St. Petersburg
pg. 34
9/5/2014
Outlining Data
Outlining provides a structure to your worksheet to quickly hide or display detail and
summary information. Your worksheet should already contain summary rows. You
can outline automatically or manually. When you create subtotals, you automatically
create an outline.
Use the following procedure to create an outline.
1. Select the range of cells to include in the outline.
2. Select the Data tab from the Ribbon.
3. Select the small square in the corner of the Outline group.
4. In the Settings dialog box, check the direction of the summary rows and
columns.
5. Check the Automatic styles box to have Excel automatically apply styles to
the outline.
6. Select Create.
Diocese of St. Petersburg
pg. 35
9/5/2014
Viewing Grouped and Outlined Data
When you have added groups or created an outline, either manually or
automatically, Excel includes several features to make it easy to view different parts
of the data at once. You can expand or collapse detail data. You can also jump to
another group at any time.
How to work with grouped or outlined data.
The Hide Detail icon allows you to quickly hide the detail data.
The + icons indicate hiding detail data.
Diocese of St. Petersburg
pg. 36
9/5/2014
The Show Detail icon allows you to quickly show the detail data. You can select the
Show Detail icon multiple times to continue expanding the current level.
The minus - icons allow you to
collapse individual groups. The plus
icons allow you to expand individual
groups.
The numbers in the top left corner
indicate a level. Click on a number to
show that level.
Diocese of St. Petersburg
pg. 37
9/5/2014
Diocese of St. Petersburg
pg. 38
9/5/2014