Professional Documents
Culture Documents
Microsoft® Office
Excel® 2016:
Data Analysis with
PivotTables
Microsoft® Office
Excel® 2016:
Data Analysis
with PivotTables
Microsoft® Office Excel® 2016: Data
Analysis with PivotTables
Part Number: 091066
Course Edition: 1.0
Acknowledgements
PROJECT TEAM
Notices
DISCLAIMER
While Logical Operations, Inc. takes care to ensure the accuracy and quality of these materials, we cannot guarantee their
accuracy, and all materials are provided without any warranty whatsoever, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose. The name used in the data files for this course is that of a fictitious company. Any
resemblance to current or future companies is purely coincidental. We do not believe we have used anyone's name in creating this
course, but if we have, please notify us and we will change the name in the next revision of the course. Logical Operations is an
independent provider of integrated training solutions for individuals, businesses, educational institutions, and government agencies.
The use of screenshots, photographs of another entity's products, or another entity's product name or service in this book is for
editorial purposes only. No such use should be construed to imply sponsorship or endorsement of the book by nor any affiliation of
such entity with Logical Operations. This courseware may contain links to sites on the Internet that are owned and operated by third
parties (the "External Sites"). Logical Operations is not responsible for the availability of, or the content located on or through, any
External Site. Please contact Logical Operations if you have any concerns regarding such links or External Sites.
TRADEMARK NOTICES
Logical Operations and the Logical Operations logo are trademarks of Logical Operations, Inc. and its affiliates.
® ®
Microsoft and Excel are registered trademarks of Microsoft Corporation in the U.S. and other countries. The other Microsoft
products and services discussed or described may be trademarks or registered trademarks of Microsoft Corporation. All other
product and service names used may be common law or registered trademarks of their respective proprietors.
Copyright © 2015 Logical Operations, Inc. All rights reserved. Screenshots used for illustrative purposes are the property of the
software proprietor. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, storage in an information retrieval system, or otherwise, without
express written permission of Logical Operations, 3535 Winton Place, Rochester, NY 14623, 1-800-456-4677 in the United States
and Canada, 1-585-350-7000 in all other countries. Logical Operations’ World Wide Web site is located at
www.logicaloperations.com.
This book conveys no rights in the software or other products about which it was written; all use or licensing of such software or
other products is the responsibility of the user according to terms and conditions of the owner. Do not make illegal copies of books
or software. If you believe that this book, related materials, or any other Logical Operations materials are being reproduced or
transmitted without permission, please call 1-800-456-4677 in the United States and Canada, 1-585-350-7000 in all other countries.
Microsoft® Office Excel®
2016: Data Analysis with
PivotTables
Solutions..................................................................................... 99
| Microsoft® Office Excel® 2016: Data Analysis with PivotTables |
Glossary............................................................................................. 101
Index.................................................................................................. 103
About This Course
Course Description
Target Student
Students taking this course are experienced Excel users who are seeking to advance their
data analysis capabilities by using PivotTables.
Course Prerequisites
To ensure your success in this course, you should have experience working with Excel 2016
and PivotTables. You should already understand spreadsheet concepts and be comfortable
creating basic PivotTables. You can obtain this level of skill and knowledge by taking the
following Logical Operations courses:
• Microsoft® Office Excel® 2016: Part 1
• Microsoft® Office Excel® 2016: Part 2
Course Objectives
Upon successful completion of this course, you will be able to use Excel 2016 advanced
PivotTable functionality to analyze your raw data.
You will:
• Prepare data for PivotTable reporting and create PivotTables from various data sources.
• Analyze data by using PivotTables.
• Work with PivotCharts.
On the CHOICE Home screen, you can access the CHOICE Course screens for your specific
courses. Visit the CHOICE Course screen both during and after class to make use of the world of
support and instructional resources that make up the CHOICE experience.
Each CHOICE Course screen will give you access to the following resources:
• Classroom: A link to your training provider's classroom environment.
• eBook: An interactive electronic version of the printed book for your course.
• Files: Any course files available to download.
• Checklists: Step-by-step procedures and general guidelines you can use as a reference during
and after class.
• LearnTOs: Brief animated videos that enhance and extend the classroom learning experience.
• Assessment: A course assessment for your self-assessment of the course content.
• Social media resources that enable you to collaborate with others in the learning community
using professional communications sites such as LinkedIn or microblogging tools such as
Twitter.
Depending on the nature of your course and the components chosen by your learning provider, the
CHOICE Course screen may also include access to elements such as:
• LogicalLABS, a virtual technical environment for your course.
• Various partner resources related to the courseware.
• Related certifications or credentials.
• A link to your training provider's website.
• Notices from the CHOICE administrator.
• Newsletters and other communications from your learning provider.
• Mentoring services.
Visit your CHOICE Home screen often to connect, communicate, and extend your learning
experience!
As You Review
Any method of instruction is only as effective as the time and effort you, the student, are willing to
invest in it. In addition, some of the information that you learn in class may not be important to you
immediately, but it may become important later. For this reason, we encourage you to spend some
time reviewing the content of the course after your time in the classroom.
As a Reference
The organization and layout of this book make it an easy-to-use resource for future reference.
Taking advantage of the glossary, index, and table of contents, you can use this book as a first
source of definitions, background information, and summaries.
Course Icons
Watch throughout the material for the following visual cues.
Icon Description
A Caution note makes you aware of places where you need to be particularly careful
with your actions, settings, or decisions so that you can be sure to get the desired
results of an activity or task.
LearnTO notes show you where an associated LearnTO is particularly relevant to
the content. Access LearnTOs from your CHOICE Course screen.
Checklists provide job aids you can use after class as a reference to perform skills
back on the job. Access checklists from your CHOICE Course screen.
Social notes remind you to check your CHOICE Course screen for opportunities to
interact with the CHOICE community using social media.
Lesson Objectives
In this lesson, you will:
• Prepare data for a PivotTable.
• Create a PivotTable from a local data source.
• Create a PivotTable from multiple local data sources.
• Create a PivotTable from an external data source.
Lesson Introduction
Microsoft® Excel® is a powerful application for analyzing data. Trying to interpret
information from large datasets can be daunting. PivotTables provide powerful ways to
interact with data through easy-to-read formats and the ability to summarize large amounts
of data quickly. This enables you to more easily analyze a large dataset and arrive at solid
business decisions.
2 | Microsoft® Office Excel® 2016: Data Analysis with PivotTables
TOPIC A
Prepare Data
In order to create a PivotTable that will effectively answer your questions, you need to ensure your
data is in a format that will yield the desired results. Taking time to prepare your data before you
create a PivotTable will help ensure you can drill down into your raw data and provide actionable
intelligence for company leaders. By properly preparing your data for PivotTable analysis, you'll save
yourself time and effort when it comes to actually analyzing that data.
Figure 1-1: A range of cells is a group of cells in a worksheet, whereas a table is treated as a
single, independent object in Excel.
Transactional Data
Transactional Data vs. PivotTables work well with raw, transactional data. Transactional data represents each individual
Summarized Data transaction, or event, in a series of transactions and is not summarized in any way. Think of it as
data you would capture at the time of a transaction, such as the purchase of an item. In this scenario,
each row in the dataset contains just one purchase, or transaction. Since there is no summary of
information, transactional data typically includes only column labels and not row labels.
Before creating a PivotTable, be sure to remove any summarized data, including groups and
subtotals, from your source data. Although you can create PivotTables from summarized data, they
will never give you as much granular insight into your data as PivotTables created from transactional
data.
Note: In order to remove a group, you must first determine the method of grouping applied. If
rows were grouped automatically using Excel's SUBTOTAL function, a subtotal row is listed
above the grouped rows. If rows or columns were grouped manually using the group function,
no subtotal row or column is visible.
Figure 1-2: Transactional data shows each event; summary data is compiled in some way.
Clean Data
Because a PivotTable is a view of your source data, it's important to have clean data as a foundation. Clean Data
This entails making sure the source data meets certain criteria for optimizing PivotTable results.
Without using clean data as a starting point, you can still create a PivotTable, but the results might
be faulty and make grouping or sorting data problematic. Taking time to prepare the source data
properly will ensure that your PivotTable is accurate and effective.
Clean data has the following characteristics:
• The first row has headings that clearly describe the data in each column.
• Each column represents a unique data category.
• Column names do not double as data items.
• Each cell is formatted accurately based on the data type. For example, the number format for
fields to be used in calculations or the date format for fields containing dates.
• Each column's data is consistently formatted. (The data types are not mixed within one column.)
• There are no blank rows, columns, or cells.
• There are no filters applied.
• There are no subtotals.
• There are no duplicate data entries.
Duplicate Data
Duplicate Data Between It's important to eliminate duplicate data in your source table. Duplicate data is data that appears in
Datasets more than one field or table of one dataset or across datasets. For example, if a transaction is
accidentally entered into a database twice, the second instance is duplicate data. Across databases,
data is duplicated when the same information is stored in multiple places. Suppose you have three
separate databases and you store the customer number and first and last names of your customers in
all three databases. The customer number forms a relationship, or connection, between the datasets,
but the first and last names of customers are considered duplicate data.
Removing duplicate data from a dataset is not always straightforward. It takes knowledge of the
dataset to determine whether data is valid or duplicate. For example, a large company may have
millions of customers in a database. In such a large dataset, there are bound to be multiple
customers who have the same name. If you remove duplicate data based on name alone, legitimate
unique entries might be deleted. It is often necessary to first identify possible duplicate data, such as
with conditional formatting, and then check the surrounding data to verify whether the entry is valid
or if it is a duplicate.
Figure 1-4: Although Customer Number forms a relationship among the datasets, First Name and
Last Name are duplicates because they appear in all three datasets.
Figure 1-5: Remove any blank rows and columns and fill in any blank cells when preparing data
for your PivotTable.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Prepare Data.
ACTIVITY 1-1
Preparing Data
Data File
C:\091066Data\Preparing Data and Creating PivotTables\Travel_Bookings.xlsx
Scenario
You are a data analyst for Leaps & Bounds Travel, a travel agency serving the travel needs of the
residents of Greene City, Richland. Your colleague has sent you an Excel workbook containing the
travel bookings data from 2016 for your analysis. You plan to create a PivotTable from it, but first
you will clean up the data.
Notify students of any
Note: Activities may vary slightly if the software vendor has issued digital updates. Your changes to activities
instructor will notify you of any changes. based on digital software
updates issued by the
software vendor.
1. Open the workbook.
a) From the C:\091066Data\Preparing Data and Creating PivotTables directory, open
Travel_Bookings.xlsx in Microsoft Excel 2016.
b) Maximize the Excel application window.
8. Apply the currency format, with no decimal places showing, to the entries in column F.
a) Select column F.
b) Select Home→Number→Format drop-down arrow→Currency.
11. Save the file by selecting File→Save. Keep the file open.
TOPIC B
Create a PivotTable from a Local Data Source
Now that you know how to prepare your data, you are ready to create a PivotTable. You can quickly
create a basic PivotTable from a table or range within a workbook as the source data for your
report.
PivotTables
PivotTables A PivotTable is a dynamic Excel data object that enables users to perform data analysis by
reorganizing and summarizing data. Excel takes your source data and turns it into an interactive
layout of columns, rows, values, and filters, which allows you to manipulate data to meet your
business analysis needs.
With a PivotTable's powerful functionality, you can drag and drop fields to look at information
from different perspectives to get a fresh view of statistics. As you move fields around in the
PivotTable, Excel automatically adjusts the report layout and recalculates totals, which can save you
hours of analysis work.
In the following example, the PivotTable was created from a dataset that represents sales figures.
Each of the unique entries in the Rep column of the dataset has become a row label for the
PivotTable. As each sales rep appears in the dataset more than once, the rows now represent a
summary of all sales for each rep. Similarly, each of the unique entries in the Project Type column
of the dataset has become a column label for the PivotTable. Finally, the summary data in each of
the cells of the PivotTable represents the sum of sales per project type per sales rep.
Pivoting
Pivoting A PivotTable enables you to pivot your raw data. In Excel, pivoting is a form of data manipulation
that can take a column of data and pivot it into a row, and vice versa. Pivoting reorganizes and
summarizes your data based on a set number of criteria and enables you to view your data from
different perspectives.
For example, suppose you have a dataset that contains rows of data, each representing a single
event, such as a shipment. The cells of each row would be composed of different aspects of the
shipment, such as date, dollar amount, or location. If you want to summarize data about these
shipments as a whole, say to find the total dollar amount of shipments that occurred on each date,
you could take the date column and pivot it so that each unique date is represented by an individual
row.
In the original dataset, each row represents a single shipment. The dollar amounts for all the
shipments were in the same column and each was associated with one of the dates. Now that the
dates are represented by rows in the pivoted dataset, you want to know the total value of all the
shipments from the dataset for each date. Manually calculating this information, or using a formula
to summarize, would take some time; however, you can ask Excel to sum the values together and
return the total dollar amount for each date. This pivoted data answers a very specific question:
What was the value in shipments for each day? This simple example shows the power of pivoting.
Note: Pivoting does not affect your raw data; it only modifies your view of the data.
Figure 1-7: The pivoted data provides the dollar amounts of shipments per day at a glance.
Figure 1-9: The Recommended PivotTables dialog box offers you suggestions on pivoting your
source data.
The following table provides a brief description of the various elements of the PivotTable Fields
task pane.
Tools drop-down Selecting the Tools drop-down arrow displays a menu that allows you to
arrow rearrange the sections and areas by selecting various preconfigured
PivotTable Fields task pane layouts. You can also alter the order in
which the fields appear within the Choose fields to add to report
section of the PivotTable Fields task pane.
Field check boxes The columns from your data source are now fields for the PivotTable.
The field check boxes allow you to add or remove fields from the various
areas. By default, when you check a field's check box that is formatted as
a text field, Excel places it in the ROWS area. When you check a field's
check box that is formatted as a number field, Excel places the field in the
VALUES area. Unchecking the field's check box removes that field from
all areas in the PivotTable Fields task pane. As you have no real control
over where Excel places fields when using the check boxes, many users
prefer to simply drag fields to the desired areas.
Field drop-down arrow Selecting a field's drop-down arrow displays a menu that allows you to
move fields among the areas, move fields up or down in an area's
hierarchy, or remove the field from that area. You can also access the
Field Settings dialog boxes.
The following table identifies the types of commands in the various groups on the Analyze tab.
PivotTable Accessing the PivotTable Options dialog box, which allows you to
change the general settings of your PivotTable. This group also displays
the name of the currently selected PivotTable.
Active Field Accessing the Value Field Settings dialog box, expanding or collapsing
hierarchies in your PivotTables, and drilling up or down in PivotTables
created from databases.
Group Grouping and ungrouping various elements within a PivotTable, and
managing those groups.
Filter Inserting a slicer or timeline, and managing filter connections.
Data Refreshing PivotTable data and changing the data source for the
PivotTable.
The following table identifies the types of commands in the various groups on the Design tab.
When creating the PivotTable, you would typically create rows out of sales reps (your primary
concern) and columns out of the project type (the items for which you are measuring performance).
Then you would ask Excel to use the SUM function to total the sales for each rep per project type.
Here's the resulting PivotTable from the entire dataset that answers this question: What are the total
sales for each sales rep by project type? Notice that the sales reps are listed by row and the project
types are listed by column. The values in the PivotTable are total sales, indicating the use of the
SUM function, for each sales rep for each project type.
PivotTable
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a PivotTable from a Local Data Source.
ACTIVITY 1-2
Creating a PivotTable from a Local Data Source
1. Insert a PivotTable.
a) Select any cell within the table.
b) Select Insert→Tables→PivotTable.
c) In the Choose the data that you want to analyze section, confirm that your table is selected.
Within the worksheet, the dashed outline surrounding the table also helps you confirm that the right
table is selected.
d) In the Choose where you want the PivotTable to be placed section, confirm that New Worksheet is
selected.
e) Select OK.
Sheet2 is added, and a PivotTable has been added. The PivotTable contains no columns, rows, or
values yet. The PivotTable Fields task pane is shown so you can configure the PivotTable from the
fields in Table1.
2. Structure the PivotTable to answer the question "How much did each travel agent sell per destination?"
a) In the PivotTable Fields task pane, in the Choose fields to add to report section, drag the Amount
field to the VALUES area.
This addresses the "how much" part of the question. The PivotTable will show a sum of the
transaction Amount values.
b) Drag the Agent# field to the ROWS area.
This addresses the "each travel agent" part of the question. Each row in the PivotTable will
summarize sales results for one agent.
c) Drag the Destination# field to the COLUMNS area.
This addresses the "per destination" part of the question. Each column will summarize sales results
for one destination.
d) In cell A3, type Total and press Enter.
Each value in the PivotTable represents a particular agent's total sales for a particular destination.
b) In the VALUES area, select Sum of Amount, and select Value Field Settings.
c) Change the Summarize value field by setting to Count and change the Custom Name to Count
d) Select OK.
For each destination (shown across columns), you can now view summary values for each sales agent
(rows 1 through 11). For each destination, you can view the agent's total sales, average sale, and
number (count) of sales.
6. What might you do to make this PivotTable easier to understand and interpret?
A: One significant improvement would be to show actual names for destinations and agents instead
of numbers.
Students will make this
7. Save the workbook by selecting File→Save. improvement in the next
activity.
8. Close the workbook, but leave the Excel application open by selecting File→Close.
TOPIC C
Create a PivotTable from Multiple Local Data
Sources
You now know how to create a PivotTable from one local data source, from a table or a range of
cells. Often, though, you have data in multiple spreadsheets that you'd like to summarize.
Fortunately, you can accomplish this with a PivotTable. In this topic, you will create a PivotTable
from multiple local data sources.
Figure 1-15: Use the check box at the bottom of the Create PivotTable dialog box to add data to
the Data Model.
The Data Model appears as a collection of tables on the ALL tab of the PivotTable Fields task
pane. You can expand or collapse each named table to drag and drop the fields into the PivotTable
just as you would with a single data source.
Figure 1-16: The Data Model is visualized on the ALL tab of the PivotTable Fields task pane.
Note: To work directly with the graphical view of the Data Model, you must use the Excel 2016
PowerPivot add-in.
Named Tables
Creating named tables will help you to create a PivotTable from multiple local sources. Table names Named Tables
are displayed on the ALL tab of the PivotTable Fields task pane. They allow you to quickly Remind students of the
identify which source data the fields belong to. Use the Table Name box on the Design tab of the named table from the
Table Tools contextual menu to name a table. previous exercise.
Emphasize how easy
In Excel, a valid table name: the naming made it to
• Begins with an underscore or a letter. understand where the
• Contains only letters, numbers, or underscores. data came from.
• Does not contain a space or other invalid characters.
• Does not conflict with the name of another object in the workbook.
• Does not conflict with an Excel built-in name, such as the name of a function or a cell reference.
Figure 1-19: Use the Manage Relationships dialog box to manage relationships between tables in
your workbook.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a PivotTable from Multiple Local Data Sources.
ACTIVITY 1-3
Creating a PivotTable from Multiple Local Data
Sources
Data File
C:\091066Data\Preparing Data and Creating PivotTables\Travel_Multiple.xlsx
Scenario
Previously, your colleague sent you data on travel bookings, but you need some additional data to
create a more robust PivotTable. For example, two of the columns, Agent# and Destination#,
contain numbers instead of the actual names of the agents who assisted customers in booking and
the names of the trip destinations.
You have requested that your colleague send you the additional information you need. She has sent
you a workbook containing multiple worksheets of data, with separate worksheets for bookings,
agent names, and destination names. You will now create a PivotTable that combines data from
these three worksheets to answer the question "How much did each travel agent sell per destination
region?"
c) Select OK.
d) From the Table Tools contextual menu, on the Design tab, in the Properties group, select the Table
Name field.
e) Type Bookings and then press Enter.
3. Repeat the steps you used to create the Bookings table to create tables for AgentInfo and Destinations.
a) From the data in the AgentInfo worksheet, create a table named AgentInfo
b) From the data in the Destinations worksheet, create a table named Destinations
f) Select OK.
A PivotTable is inserted into a new worksheet.
5. In the PivotTable Fields task pane, verify that the Choose fields to add to report list displays a list for
each table consisting of all the fields in each table.
a) In the PivotTable Fields task pane, select the ALL tab.
b) In the Choose fields to add to report list, verify that each of the table names is listed.
c) Select the drop-down arrows to the left of each table name and verify that the fields from each table
are listed.
c) From the four drop-down lists, select the options shown here.
d) Select OK.
c) Select OK.
d) In the Manage Relationships dialog box, select Close.
8. Structure the PivotTable to answer the question "How much did each travel agent sell per destination
region?"
a) In the PivotTable Fields task pane, on the ALL tab, in the Choose fields to add to report section,
expand the AgentInfo table.
b) Drag the Agent_Name field to the ROWS area.
c) On the ALL tab, in the Choose fields to add to report section, expand the Destinations table.
d) Drag the Destination_Region field to the COLUMNS area.
e) On the ALL tab, in the Choose fields to add to report section, expand the Bookings table.
f) Drag the Amount field to the VALUES area.
TOPIC D
Create a PivotTable from an External Data
Source
Up until now, you've been using Excel ranges or tables within a workbook as the source data for
your PivotTables. However, it is common in today's business world to work with data from a variety
of sources.
You won't always have source data in Excel ready to create a PivotTable. Many times, your source
data is stored outside of Excel. Fortunately, Excel provides a way to create PivotTables from data
sources outside of Excel. In this topic, you will create a PivotTable from an external data source.
Figure 1-20: Use the buttons in the Get External Data group to set up and manage connections
to external data sources for use in PivotTables.
Figure 1-21: Use the Select Data Source window to locate your external data source from Access,
the web, a text file, or an XML file.
Figure 1-22: Use the Select Table dialog box to choose which tables to import from the external
data source.
PivotChart, or just create a connection without viewing it as one of the previous options. In the
bottom section, you choose where to put the data, either in your current worksheet or in a new
worksheet. In addition, if you import more than one table, Excel automatically adds the imported
tables to the Data Model. This is indicated by the already checked check box at the bottom of the
Import Data dialog box. If you select PivotTable Report from the top section and select OK,
Excel displays a PivotTable for the data.
Figure 1-24: The Data Connection Wizard walks you through setting up connections with
external data sources other than Access, the web, or a text file.
Figure 1-25: Use the Existing Connections dialog box to select an external data source for your
PivotTable.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a PivotTable from an External Data Source.
ACTIVITY 1-4
Creating a PivotTable from an External Data
Source
Data File
C:\091066Data\Preparing Data and Creating PivotTables\LeapsAndBounds_Database.accdb
Scenario
Your supervisor asks you how much customers who are members of the Leaps & Bounds travel
program spent on travel to each region. Previously, your colleague sent you a workbook containing
multiple worksheets of data, with worksheets for bookings, agent names, and destination names, but
you do not have specific information on the customers, other than a field called Cust_Number.
When asking your colleague to send you the customer data as well, you find out that all of the data
you've been sent so far, as well as the customer information, is contained in a Microsoft Access file.
To create a PivotTable including all of the data you need, you will create a PivotTable from the
Access database.
3. Structure the PivotTable to answer the question "How much did each travel agent sell to members and
non-members per destination region?"
a) On the ACTIVE tab of the PivotTable Fields task pane, drag the following items to structure the
PivotTable.
• From the Destinations table, drag Destination_Region to ROWS.
• From the Agent_Info table, drag Agent_Name to ROWS.
• From the Customer_Info table, drag Member to COLUMNS.
• From the Bookings table, drag Amount to VALUES.
4. For each region, which group is generally responsible for more sales revenue—non-members ("N") or
members ("Y") of the travel program?
A: Sales totals in each region are greater for non-members than for members.
5. How might you compare the number of transactions by non-members to the number of transactions by
members?
A: Drag Bookings→Amount to VALUES, and summarize the new value by Count.
If there is time, have
6. Save the workbook. students try this. It
shows that there are
7. Close the workbook, but leave the Excel application open by selecting File→Close. significantly more sales
to non-members than to
members.
Summary
In this lesson, you prepared data for a PivotTable, explored the Data Model's powerful analysis
capabilities, and created a PivotTable from various data sources. Ensuring that you have clean,
transactional data for your PivotTable allows you to be confident in your PivotTable results. Also,
being able to create a PivotTable from any data source enables you to achieve powerful and efficient
data analysis in one report.
Encourage students to
use the social If you've been unsuccessful in creating PivotTables in the past, how do you think the overall structure of
networking tools your source data affected the outcome?
provided on the CHOICE A: Answers will vary, but students may mention that their data sources contained some summary data,
Course screen to follow duplicate data, or blank cells.
up with their peers after
the course is completed What tasks that you typically perform would PivotTables help you complete more effectively or efficiently?
for further discussion
and resources to support A: Answers will vary, but most students will mention that PivotTables help them to summarize data
continued learning. quickly to enable analysis of items such as cost, performance, and general reporting.
Note: Check your CHOICE Course screen for opportunities to interact with your classmates,
peers, and the larger CHOICE online community about the topics covered in this course or
other topics you are interested in. From the Course screen you can also access available
resources for a more continuous learning experience.
Lesson Objectives
In this lesson, you will:
• Summarize PivotTable data.
• Organize PivotTable data.
• Filter PivotTable data.
• Format a PivotTable.
• Refresh and change PivotTable data.
Lesson Introduction
In many cases, a basic PivotTable can provide you with sufficient data summaries for your
analysis, but what if you need to perform a more complex analysis? Suppose you need to
filter your PivotTable, group certain data together, alter its formatting, or analyze data from
multiple sources. Now that you've created a basic PivotTable, you're ready to dive deeper
into your data analysis.
38 | Microsoft® Office Excel® 2016: Data Analysis with PivotTables
TOPIC A
Summarize PivotTable Data
When you create a PivotTable, Microsoft® Excel® defaults to summarizing the data in certain ways.
If you're looking for more than a sum or a count of the items in your fields or want to total only
certain data in your PivotTable, you can customize how your data is presented and calculated. Excel
makes it easy to adjust the display of PivotTable data to meet your business analysis needs. In this
topic, you will summarize PivotTable data in various ways.
On the Summarize Values By tab of the Value Field Settings dialog box, you can change the
way the data from the selected field is summarized and also rename the field in the PivotTable.
The Summarize Values
By Tab
Figure 2-2: The Summarize Values By tab of the Value Field Settings dialog box.
The following table describes the summary functions on the Summarize Values By tab of the
Value Field Settings dialog box.
Sum The sum of the values. This is the default function for numeric fields.
Count The total number of records for a category, including numeric, text, and
error cells. This is the default function for text fields.
Average The average (arithmetic mean) for values in a category.
Max The largest numeric value of a field in a category.
Min The smallest numeric value of a field in a category.
Product The product of all numeric values in a category. For example, the values 2, 3,
and 4 would equal 24.
Count Numbers The total number of numeric records in a category and ignores all non-
numeric items.
StdDev The standard deviation of a field in a category.
StdDevP The standard deviation for the population of a field in a category.
Var The statistical variance of a field in a category.
VarP The statistical variance for the population of a field in a category.
Figure 2-3: The Show Values As tab of the Value Field Settings dialog box.
The following table describes the calculation options on the Show Values As tab of the Value
Field Settings dialog box.
Calculation Result
Calculation Result
Rank Smallest to Displays the numeric rank of selected values in a field. Excel lists the
Largest smallest item in the field as 1, and each larger value with a larger rank.
Rank Largest to Displays the numeric rank of selected values in a field. Excel lists the
Smallest largest item in the field as 1, and each smaller value with a smaller rank.
Index Displays the relative importance of an item. Excel performs the
calculation as follows: ([value in the cell] × [grand total of grand totals]) /
([grand row total] × [grand column total]).
Figure 2-4: Use the Insert Calculated Field dialog box to create, modify, or delete custom
calculated fields in your PivotTable.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Summarize PivotTable Data.
ACTIVITY 2-1
Summarizing PivotTable Data
Data File
C:\091066Data\Analyzing Data by Using PivotTables\LeapsAndBounds-Bookings2015.xlsx
Scenario
You are preparing for an upcoming presentation, where you will present important data from the
travel bookings for 2015. You'll start by answering three questions:
• Which region did customers spend the most money booking in 2015?
• Which region was the most popular travel destination that was booked in 2015?
• What percentage of trips were booked to the most popular region in 2015?
Your supervisor has also asked you how much the bookings would have been per region if Leaps &
Bounds had offered a 5-percent discount on all bookings in 2015, for which you will create a
calculated field. You already have a PivotTable set up, so you can start right in on the analysis.
2. Structure the PivotTable to answer the question "Which region did customers spend the most money
booking in 2015?"
a) Ensure that the PivotTable is selected.
Note: You can tell that a PivotTable is selected if you can see the PivotTable
Fields task pane and the PivotTable Tools contextual tab. If you cannot see
the task pane and the contextual tab, then select any cell within the
PivotTable.
b) In the PivotTable Fields task pane, drag the following items to structure the PivotTable.
• Drag Destination_Region to ROWS.
• Drag Amount to VALUES.
3. Review the totals in the PivotTable cells to determine the amount of money spent on booking trips to
each region.
4. Which region did customers spend the most money booking in 2015?
A: North America, with $43,362,038 booked on travel to this region in 2015.
5. Use the PivotTable to answer the question "Which region was the most popular travel destination that
was booked in 2015?"
a) In the PivotTable Fields task pane, in the VALUES area, select the Sum of Amount drop-down
arrow.
b) From the drop-down menu, select Value Field Settings.
c) In the Value Field Settings dialog box, on the Summarize Values By tab, select Count. Then select
OK.
6. Review the totals in the PivotTable cells to determine the number of trips booked to each region.
7. Which region was the most popular travel destination that was booked in 2015?
A: North America, with 5,122 trips booked in 2015.
8. Use the PivotTable to answer the question "What percentage of trips were booked to the most popular
region in 2015?"
a) In the PivotTable Fields task pane, in the VALUES area, select the Count of Amount drop-down
arrow.
b) From the drop-down menu, select Value Field Settings.
c) In the Value Field Settings dialog box, select the Show Values As tab.
d) From the Show values as drop-down menu, select % of Grand Total. Then select OK.
9. Review the totals in the PivotTable cells to determine the percentage of trips taken in North America.
10. What percentage of trips were booked to the most popular region in 2015?
A: 51.15 percent of trips were taken to North America in 2015.
12. Create a calculated field to find out how much the bookings would have been per region if Leaps &
Bounds had offered a 5-percent discount on all bookings in 2015.
a) Select PivotTable Tools→Analyze→Calculations→Fields, Items, & Sets→Calculated Field.
b) In the Name text box, type After_Discount
c) In the Fields area, select Amount and then select Insert Field.
d) In the Formula text box, after Amount, type *0.95
e) Select Add.
The calculated field After_Discount is added to the PivotTable Fields task pane.
f) Select OK.
The calculated field After_Discount is added to the PivotTable.
TOPIC B
Organize PivotTable Data
The PivotTable does a great job of summarizing raw data, but sometimes the data isn't presented in
the best way for your analysis. For a PivotTable to be truly useful, you need to be able to read it and
make sense of it quickly, so that you can make meaningful decisions from the data. For example,
instead of searching through rows of data to find the largest or smallest value, it would be quicker
and easier to simply sort the data. In this topic, you will organize PivotTable data.
Sorting
Sorting It can be helpful to sort the summarized data in your PivotTable, to quickly determine which value
is largest or to see data in ascending or descending order. You can sort numbers by value and text
alphabetically in your PivotTable using the Row Labels and Column Labels drop-down menus.
Figure 2-5: Sort row and column field entries using the Row Labels and Column Labels drop-
down menus.
Figure 2-6: Use the Collapse button to see less detail and the Expand button to see more detail.
Figure 2-7: Use the Group feature to combine data into more manageable pieces for analysis.
Figure 2-8: Use the Grouping dialog box to define your date and time field groupings.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Organize PivotTable Data.
ACTIVITY 2-2
Organizing PivotTable Data
Scenario
A colleague is giving a presentation and sends you a couple of questions he'd like you to answer
based on your PivotTable data. The questions are:
• Which region has the largest percentage of its bookings for 21-30 days?
• In the Oceania/Australia region, which city has the most trips booked for 21-30 days?
You already have a PivotTable set up, so you can start right in on the analysis.
1. Structure the PivotTable to answer the question "Which region has the largest percentage of its
bookings for 21-30 days?"
a) Ensure that the PivotTable is selected.
b) In the PivotTable Fields task pane, structure the PivotTable as follows:
• Drag Destination_Region to ROWS.
• Drag Length of Stay to COLUMNS.
• Drag Booking# to VALUES.
c) In the PivotTable Fields task pane, in the VALUES area, select the Sum of Booking# drop-down
arrow, and select Value Field Settings.
d) In the Summarize value field by list, select Count.
e) Select the Show Values As tab.
f) From the Show values as drop-down list, select % of Row Total. Then select OK.
3. Which region has the largest percentage of its bookings for 21-30 days?
A: Oceania/Australia, with 39.11 percent of trips to that region booked for 21-30 days.
4. Structure the PivotTable to answer the question "In the Oceania/Australia region, which city has the
most trips booked for 21-30 days?"
a) In the PivotTable Fields task pane, in the Choose fields to add to report section, drag
Destination_City to the ROWS area under Destination_Region.
c) In the PivotTable Fields task pane, in the VALUES area, select the Count of Booking# drop-down
arrow.
d) From the drop-down menu, select Value Field Settings.
e) Select the Show Values As tab.
f) From the Show values as drop-down list, select No Calculation. Then select OK.
6. In the Oceania/Australia region, which city has the most trips booked for 21-30 days?
A: Melbourne, with 34 trips booked for 21-30 days.
TOPIC C
Filter PivotTable Data
Now that you can summarize and organize your PivotTable data in different ways, you are ready to
filter your PivotTable data. This comes in handy when you are analyzing a subset of your data and
want to ignore all data that is not relevant to your current analysis.
Figure 2-9: Drag a field to the FILTERS area to filter the entire PivotTable based on unique
entries.
Manual Filters
You can apply a manual filter to a PivotTable field already in the PivotTable by selecting the Row Manual Filters
Labels or Column Labels drop-down menu in the PivotTable itself. The drop-down menu allows
you to see only certain values in that field and exclude others. For example, using the drop-down
menu next to Row Labels, you could filter to show data for selected countries only, as shown in the
following figure.
Figure 2-10: You can manually filter a PivotTable field by selecting an entry from the Row Labels
or Column Labels menu.
You can also filter on values and labels using the Label Filters and Value Filters fly-out menus.
For example, you could set up the filter to display data for the Amount field only if it is greater than
or equal to 10,000. The resulting PivotTable would display data only for entries with sales amounts
that are $10,000 or more. Or you might choose to show only entries with the top 10 sales amounts.
The following filter options are available in the Label Filters and Value Filters fly-out menus:
• Equals
• Does Not Equal
• Begins With
• Does Not Begin With
• Ends With
• Does Not End With
• Contains
• Does Not Contain
• Greater Than
• Greater Than or Equal To
• Less Than
• Less Than or Equal To
• Between
• Not Between
• Top 10
Slicers
When you are filtering on multiple entries, it can be easy to lose track of what you're filtering on. Slicers
Instead of manually filtering data in your PivotTable, you can use slicers to see what you are filtering
on at a glance. A slicer is an individual Excel object used to filter the data in PivotTables. You can
create a slicer out of any of the fields associated with a PivotTable, and then use those slicers to
filter each field by any of its unique entries.
When you create a slicer, each unique entry in that field is turned into a button within the slicer. You
use these buttons to select which data you'd like to see in your PivotTable, as indicated when the
button appears blue, and which data you want to filter out of your PivotTable, as indicated when the
button appears white. If a slicer button is a faded-out shade of blue, this means that some active
filter has removed the entries from the PivotTable. Faded-out slicer buttons are inactive, as you
cannot filter on entries that do not appear in the PivotTable. Clearing the filter that is suppressing
the entries will reactivate the associated slicer button(s).
To select multiple slicer buttons simultaneously, press and hold Ctrl while making your selections.
Selecting the Clear Filter button deactivates all filters on a slicer, so that all the entries appear in the
PivotTable. You can place slicers anywhere on your worksheets and resize them. You can even place
copies of slicers in multiple locations. The original slicer and the copies remain linked, so whatever
filters you apply to one of them affect all of the copies.
Figure 2-11: Use slicers to quickly and easily apply multiple filters to your PivotTables.
Although a slicer is typically associated with just one PivotTable, you can link slicers to multiple
PivotTables. This is usually done when the PivotTables are associated with the same data source.
Figure 2-12: The Insert Slicers dialog box allows you to create a slicer from any field available in
your PivotTable.
The following table describes the types of commands you will find in the command groups on the
Slicer Tools contextual tab.
Timelines
With a PivotTable timeline, you can easily filter dates in your PivotTable. The timeline works like a Timelines
slicer, but has a different interface. The timeline groups your dates into days, months, quarters, or
years. The default view for the timeline filter is months, as seen in the following figure, but you can
use the Time period drop-down menu to change the view to days, quarters, or years. To filter your
PivotTable data, use the Time period selector. Simply select a time period in the timeline or drag
the ends of the Time period selector to your desired time period. If you want to view all of the
dates in your PivotTable, select the Clear Filter button.
Figure 2-15: The Insert Timelines dialog box allows you to create a timeline from any date field
available for your PivotTable.
The following table describes the types of commands you will find in the command groups on the
Timeline Tools contextual tab.
Note: You use the Filter Connections dialog box to manage all filter connections, but you can
manage just slicer connections or just timeline connections. To manage only slicer connections,
use the Report Connections dialog box on the Slicer Tools contextual tab by selecting
Options→Slicer→Report Connections. Likewise, to manage only timeline connections, use
the Report Connections dialog box on the Timeline Tools contextual tab by selecting
Options→Timeline→Report Connections.
Figure 2-18: Access the Quick Explore feature by hovering over a selected field.
ACTIVITY 2-3
Filtering PivotTable Data
Scenario
Your supervisor has asked you to determine the top travel destinations in 2016. He sends you the
following specific questions:
• What are the top five destination countries in 2016?
• What are the top five destination cities in the United States in 2016?
• What are the top five destination cities in Canada in 2016?
• What are the top five destination cities in Europe in 2016?
You plan to use a timeline and manual filters to answer these questions. After using manual filters to
answer the first two questions, you realize it would be easier to use slicers instead. You already have
a PivotTable set up, so you can start right in on the analysis.
1. Structure the PivotTable to answer the question "What are the top 5 destination countries in 2016?"
a) Ensure that the PivotTable is selected.
b) In the PivotTable Fields task pane, in the Choose fields to add to report section, drag the
Destination_Country field to the ROWS area.
c) Drag the From_Date field to the VALUES area.
d) Examine the value you added to the VALUES area.
In previous examples, the default value was the sum of the field you dragged into the VALUES area.
In this case, the count is shown by default because you dragged a date value. While you're likely to
want a sum for currency (e.g., total sales), it's not likely that you would want a sum of dates, so
Excel displayed count as the default value, instead of sum.
b) Use the horizontal scroll bar in the timeline box to scroll as far as you can to the left.
Note: The handle is not shown until you position the mouse pointer over the
Time period selector.
With this configuration, results will be filtered to include only dates within 2016.
4. Filter the PivotTable for the top 5 countries and sort the results.
a) In the PivotTable, from the Row Labels drop-down menu, select Value Filters→Top 10.
b) Change the 10 in the second field to 5 so that the Show fields are selected as Top 5 Items by Count
of From_Date.
c) Select OK.
d) Sort the entries by right-clicking cell B4 and, from the fly-out menu, select Sort→Sort Largest to
Smallest.
6. Structure the PivotTable to answer the question "What are the top 5 destination cities in the United
States in 2016?"
a) From the Row Labels drop-down menu, clear the filter by selecting Value Filters→Clear Filter.
All countries are shown again.
b) In the PivotTable Fields task pane, drag Destination_Country from the ROWS area to the FILTERS
area.
c) In the PivotTable Fields task pane, in the Choose fields to add to report section, drag
Destination_City to the ROWS area.
d) Examine the Destination_Country filter that you just added, which is shown in cells A1 and B1.
7. Filter the PivotTable for the top 5 U.S. cities and sort the results.
a) Right-click cell A4 (Anaheim) and select Filter→Top 10.
b) Change the 10 in the second field to 5 so that the Show fields are selected as Top 5 Items by Count
of From_Date. Then select OK.
c) Sort the entries by right-clicking cell B4 and, from the fly-out menu, selecting Sort→Sort Largest to
Smallest.
8. What are the top 5 destination cities in the United States in 2016?
A: 1. Charlotte, 2. Newark, 3. Palm Springs, 4. Baltimore, 5. Orlando (tied with Memphis)
9. Insert slicers.
a) In the PivotTable Fields task pane, in the Choose fields to add to report section, uncheck the
Destination_Country check box.
b) Select PivotTable Tools→Analyze→Filter→Insert Slicer.
c) From the Insert Slicers dialog box, check the boxes for Destination_Country and
Destination_Region. Then select OK.
10. Reposition the slicers to the right of the PivotTable and resize them so you can see the complete field
name at the top of each of them.
12. Use slicers to answer the question "What are the top 5 destination cities in Canada in 2015?"
a) In the Destination_Region slicer, select North America.
b) In the Destination_Country slicer, select Canada.
14. Use slicers to answer the question "What are the top 5 destination cities in Europe in 2015?"
a) In the upper-right corner of the Destination_Country slicer, select the Clear Filter button to clear the
Canada filter.
b) In the Destination_Region slicer, select Europe.
16. Clear the PivotTable fields and all filters by selecting PivotTable Tools→Analyze→Actions→Clear→Clear
All.
As they did in the
previous activity, 17. Save the workbook.
students are clearing the
fields in preparation for 18. Close the workbook, but leave the Excel application open by selecting File→Close.
the next activity. This
demonstrates a different
way to clear all fields
from the PivotTable.
TOPIC D
Format a PivotTable
After you've manipulated your PivotTable data, you're ready to present it in the best way. When you
format a PivotTable, it's important to align the design efficiently to meet the business needs in
question. Often, a well-constructed PivotTable can draw attention to issues and help springboard
solutions. In this topic, you will format a PivotTable.
Subtotals and grand totals appear automatically when you create a PivotTable. You can choose to
hide or show all subtotals or grand totals, or hide or show just the row or column totals. These
options are located in the Layout group on the Design tab.
Figure 2-20: Subtotals are located within the PivotTable, whereas grand totals are located on the
right side and on the bottom.
Option Description
Show in Compact Field labels on the left side of the PivotTable are kept in one column to
Form minimize scrolling and are indented to show their hierarchical
relationship. This form optimizes readability of the PivotTable and is the
default layout.
Show in Outline Field headings are included in the PivotTable. This form is the classic
Form PivotTable style.
Show in Tabular Field headings are included in the PivotTable. The data is shown in a
Form traditional table format, so that you can easily copy cells to another
worksheet or range.
Repeat All Item Item and field labels are repeated in the PivotTable. This makes the data
Labels easier to scan by visually grouping rows or columns together.
Do Not Repeat All Item and field labels are shown only once in the PivotTable. This option
Item Labels is the default option for PivotTables.
The following table describes the options contained in the Blank Rows menu.
Option Description
Insert Blank Line Inserts a blank row after items in the PivotTable. This separates the data,
After Each Item which can result in better readability in some circumstances.
Remove Blank Line Removes the blank rows after each item in the PivotTable for a more
After Each Item compact view. This is the default option for PivotTables.
Style Options
In the PivotTable Style Options group on the Design tab of the PivotTable Tools contextual PivotTable Style Options
tab, there are four style options for you to choose from: Row Headers, Column Headers,
Banded Rows, and Banded Columns.
Option Description
Styles
Instead of manually applying formatting throughout your PivotTables, you can select from a variety PivotTable Styles
of styles to format reports quickly. Not only do preset styles save you time, but they can also give
your PivotTable a more polished look and make it easier to read.
Figure 2-23: Create a new style for your PivotTable using the New PivotTable Style dialog box.
ACTIVITY 2-4
Formatting a PivotTable
Data File
C:\091066Data\Analyzing Data by Using PivotTables\LeapsAndBounds-Format.xlsx
Scenario
You have been working on a PivotTable to present at an upcoming meeting. To make it easier to
read during the presentation, you will format the PivotTable.
Note: All corresponding values will be formatted, not just the one you have
selected.
c) In the Format Cells dialog box, select Currency.
8. Close the workbook, but leave the Excel application open by selecting File→Close.
TOPIC E
Refresh and Change PivotTable Data
You've already created your PivotTable and summarized, filtered, organized, and formatted the
PivotTable data so that you can deliver an insightful analysis. But what if your source data changes?
Perhaps you have new data such as recent transactions, or maybe the data has been updated due to
customers updating their addresses or phone numbers. How do you make sure that your PivotTable
data is as up-to-date as your source data? Or maybe you want to analyze a different set of data
altogether. In this topic, you will refresh and change your PivotTable data.
Figure 2-24: Use the Refresh menu options to refresh your PivotTable and to access the
Connection Properties dialog box.
The following table describes the options in the Refresh drop-down menu.
Option Description
Refresh Refreshes the data for the currently selected PivotTable. You can use the
keyboard shortcut for this option by pressing Alt+F5.
Refresh All Refreshes all the sources in the current workbook.
Refresh Status Shows the status of the data refresh.
Cancel Refresh Cancels the data refresh that is in progress.
Connection Opens the Connection Properties dialog box, which allows you to set
Properties options pertaining to your external data or local data that's in the Data
Model.
Figure 2-25: Use the Change PivotTable Data Source dialog box to choose a different data source
for your PivotTable.
Figure 2-26: The Usage tab of the Connection Properties dialog box.
The following table describes the options in each section on the Usage tab of the Connection
Properties dialog box.
Section Description
Refresh control Contains options for controlling settings related to refreshing the
PivotTable source data, including enabling the refresh query in the
background while you use Excel, setting automatic refresh intervals,
refreshing the data when opening the file, and refreshing the connection
when the Refresh All option is selected from the Refresh menu.
OLAP Server Contains options for controlling whether the specified Online Analytical
Formatting Processing (OLAP) formats are retrieved and displayed in the data.
OLAP Drill Through Allows you to determine the maximum number of records to retrieve
from an OLAP data source when you expand a level of data in a
hierarchy.
Language Use this option to enable or disable the retrieval of translated data and
errors from the OLAP server, if there are any.
The Definition Tab Use the Definition tab to control how the connection information is defined.
Figure 2-27: The Definition tab of the Connection Properties dialog box.
The following table describes the components on the Definition tab of the Connection Properties
dialog box.
Component Description
Connection type Displays the connection type, which is either a connection file or a
section workbook.
Connection file text Displays the current connection file. If the field is blank, the connection
box file was broken or a connection file was never used. To update the
connection, use the Browse button. Check the Always use connection
file check box to ensure that the most up-to-date version of the
connection file is used whenever the data is refreshed or displayed.
Connection string Displays the connection information in the form of a connection string.
text box Use this to verify that the connection information is correct and to edit
any specific connection information. Check the Save password check
box to save the user name and password in the connection file.
Component Description
Command type drop- Displays one of four command type options: SQL, Table, Default, and
down menu Cube.
Command type text Displays the data returned based on the command type. If the command
box type is Table, the table name(s) are displayed. If the command type is
SQL, the SQL query that specifies the data is displayed.
Excel Services section Opens the Excel Services Authentication Settings dialog box, where
you can choose a method of authentication when you access the data
source. The authentication methods are Windows authentication, SSS
(Secure Storage Service), and none.
Edit Query button Allows you to change the query that Excel is using to retrieve data from
the data source.
Parameters button Opens the Parameters dialog box, where you can edit parameter
information for a Web Query or Microsoft Query connection.
Export Connection Opens the File Save dialog box, where you can save the current
File button connection information to a connection file.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Refresh and Change PivotTable Data.
ACTIVITY 2-5
Refreshing and Changing PivotTable Data
Data File
C:\091066Data\Analyzing Data by Using PivotTables\LeapsAndBounds-Refresh.xlsx
Scenario
Travel bookings in January are historically slow. In an effort to motivate its travel agents, the Leaps
& Bounds sales department had a contest, with prizes for the top travel agent who booked the most
trips in January of 2016. The sales manager has sent over the January 2016 data to you and has asked
that you answer two questions:
• Which travel agent booked the most trips in January of 2015?
• Which travel agent booked the most trips in January of 2016?
You have already created a PivotTable and set up a timeline to determine which travel agent booked
the most trips in January of 2015. Since your original source data had only the agent numbers and
not their names, you added in a column to the source data with their names. You will now refresh
the PivotTable data source so that you can see the name of the top travel agent. Then you will
change the data source to the 2016 data to determine which travel agent booked the most trips in
January of 2016.
2. Confirm that there is a new column in the data that is not yet showing up in the PivotTable Fields task
pane.
a) At the bottom of the workbook, select the 2015 Bookings worksheet.
b) In the 2015 Bookings worksheet, confirm that column D contains the travel agents' names and that it
is titled Agent_Name.
c) At the bottom of the workbook, select Sheet1.
d) Review the fields in the PivotTable Fields task pane to confirm that the Agent_Name field does not
appear in the Choose fields to add to report section.
4. Structure the PivotTable to answer the question "Which travel agent booked the most trips in January of
2015?"
a) In the PivotTable Fields task pane, drag Agent# from the ROWS area to the Choose fields to add to
report section.
b) Drag Agent_Name to the ROWS area.
c) Right-click cell B4 and, from the fly-out menu, select Sort→Sort Largest to Smallest.
9. Close the workbook, but leave the Excel application open by selecting File→Close.
Summary
In this lesson, you learned how to use a variety of methods for presenting data in a user-friendly
format to make interpreting data easier. In addition, as businesses become more data centric, the
ability to quickly summarize and analyze large sets of data becomes more and more critical not only
to your organization's success, but also to your personal success.
You may want to show
LearnTO Get More Out In what specific situations would you use a timeline versus grouping a time field?
of Your PivotTable Data A: Answers will vary, but one common answer is that a timeline allows you to filter easily, but you still
from the CHOICE can't see the data in groups. Also, if the data is not a date, then you must use grouping.
Course screen or have
students navigate out to What tasks will Excel's advanced PivotTable options make easier for you in your current role?
the Course screen and
A: Answers will vary, but most students will say that PivotTables make any data analysis task easier,
watch it for themselves
as a supplement to your especially if it's repetitive. Also, the table functionality in Excel is made easier when using a
instruction. If not, please PivotTable.
remind students to visit
the LearnTOs for this Note: To learn more, check out the LearnTO Get More Out of Your PivotTable Data
course on their CHOICE presentation from the LearnTO tile on the CHOICE Course screen.
course screen after
class for supplemental Note: Check your CHOICE Course screen for opportunities to interact with your classmates,
information and peers, and the larger CHOICE online community about the topics covered in this course or
additional resources. other topics you are interested in. From the Course screen you can also access available
Encourage students to resources for a more continuous learning experience.
use the social
networking tools
provided on the CHOICE
Course screen to follow
up with their peers after
the course is completed
for further discussion
and resources to support
continued learning.
Lesson Objectives
In this lesson, you will:
• Create a PivotChart.
• Manipulate PivotChart data.
• Format a PivotChart.
Lesson Introduction
You've explored how PivotTables enable you to present business intelligence information
quickly and easily from multiple sources. This data can help organizations make well-
informed decisions and solve problems based on solid business analytics. Yet as powerful as
PivotTables are, users often don't have time to absorb what all the numbers are showing.
Leadership especially needs the ability to make decisions quickly.
By presenting PivotTable data graphically through PivotCharts, you can help users tell at a
glance what the data is showing. The graphical interface makes it easy to notice patterns and
trends. This can greatly reduce the time it takes to make important business decisions.
78 | Microsoft® Office Excel® 2016: Data Analysis with PivotTables
TOPIC A
Create a PivotChart
When a PivotTable grows too big or when you'd like to present the information in your PivotTable
to others, it can be helpful to turn that data into a chart. Examining data visually helps you to easily
see the story in the data. In this topic, you will create a PivotChart.
PivotCharts
PivotCharts A PivotChart is an interactive, graphical representation of numeric values and relationships among
those values. When you create a PivotChart from a PivotTable, you're creating a graphical interface
of the PivotTable. Microsoft® Excel® pulls the entire PivotTable layout into the chart, allowing you
to interact with the data in a variety of ways, such as adding, removing, or filtering data.
The chart's functionality is similar to a regular Excel chart, but is linked to the underlying
PivotTable. You can create a PivotChart in the same spreadsheet as the PivotTable or place the
chart in its own sheet. It's important to keep in mind that because the two objects are linked, if you
change items in the PivotTable, the PivotChart updates to reflect those modifications.
Note: When you create a PivotChart, Excel does not include subtotals or grand totals.
The PivotChart graphically represents the summary information in a PivotTable. When you create a
column chart, the row labels in the PivotTable become the categories on the x-axis, the column
labels become the series on the y-axis, and the values are displayed as columns within the PivotChart
itself.
Note: In Excel 2016, you can also create a PivotChart from an external data source without
needing to create a PivotTable first. This method is a helpful timesaver if your main purpose is
to have an interactive chart and you don't need to have a PivotTable visible. You can access this
option in the Import Data dialog box when you are importing external data into Excel. See
Lesson 1 for more information on importing external data into Excel.
A preview of what the PivotChart will look like is shown in the middle. You can access the dialog
box by selecting PivotTable Tools→Analyze→Tools→PivotChart.
Figure 3-2: Create a PivotChart from a PivotTable using the Insert Chart dialog box.
Consider demonstrating
Note: When any cell is selected in a PivotTable, pressing Alt+F1 creates a PivotChart in the these shortcuts either
current worksheet. Pressing F11 creates a PivotChart in a new worksheet. here or when you get to
the activity.
Chart Types
Excel 2016 includes 15 different chart types, each of which is ideal for displaying a particular type of Chart Types
relationship. All of the chart types, except for X Y (Scatter) and Stock can be created from
PivotTable data. The following table describes the ideal uses for the various Excel chart types that
can be created from PivotTable data.
Recommended PivotCharts
The Recommended If you would like recommendations as to how to pivot your data for a chart, Excel provides chart
Charts Feature recommendations for you based on your source data. To access the Recommended Charts tab of
the Insert Charts dialog box, simply click anywhere in your source data in Excel. Then select
Insert→Charts→Recommended Charts. Once the Insert Chart dialog box appears, scroll
through the PivotChart suggestions on the left side of the Recommended Charts tab and preview
the suggested PivotCharts on the right side. Simply select OK when you have found a PivotChart
you want. After you view the newly created PivotChart, you can always alter the chart in any way
you want. This feature is just meant to give you a starting point or to offer ways to pivot the data
into a chart that you may not have thought of.
Figure 3-3: The Recommended Charts tab of the Insert Chart dialog box.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a PivotChart.
ACTIVITY 3-1
Creating a PivotChart from a PivotTable
Data File
C:\091066Data\Working with PivotCharts\LeapsAndBoundsBookings_Analysis.xlsx
Scenario
The sales manager at Leaps & Bounds is planning to present some data on bookings for an
upcoming meeting and has requested your help. She wants a chart that shows total bookings and
bookings per region per month for 2015. You decide to create a PivotChart to accommodate this
request.
c) If the PivotChart is covering up the PivotTable, drag the PivotChart away from the PivotTable so that
you can view both simultaneously.
Note: Drag from a blank area or the borders of the PivotChart to avoid moving
or resizing items within the chart.
TOPIC B
Manipulate PivotChart Data
When you create a PivotChart from a PivotTable, any data manipulation that you perform on the
PivotTable is reflected in the PivotChart. But instead of working with the PivotTable all the time to
alter your PivotChart, you could just work directly in the PivotChart. In this topic, you will
manipulate data directly in a PivotChart.
Figure 3-4: Use the PivotChart Fields task pane to manipulate your PivotChart just like you would
use the PivotTable Fields task pane to manipulate your PivotTable.
The following table provides a brief description of the various elements of the PivotChart Fields
task pane.
Tools drop-down Selecting the Tools drop-down arrow displays a menu that allows you to
arrow rearrange the sections and areas by selecting various preconfigured
PivotChart Fields task pane layouts. You can also alter the order in
which the fields appear within the Choose fields to add to report
section of the PivotChart Fields task pane.
Field check boxes The columns from your data source are now fields for the PivotChart.
The field check boxes allow you to add or remove fields from the various
areas. Checking a field's check box adds it to an area, whereas unchecking
it removes the field from all areas. Since you have no control over where
Excel places a field when you check its check box, many users prefer to
simply drag the fields to the desired areas.
Note: Due to a PivotChart being a chart instead of a table, the columns and rows in a
PivotTable become the legend and axes in a PivotChart.
The following table identifies the types of commands in the various groups on the Analyze tab.
PivotChart Accessing the PivotChart Options dialog box, which allows you to change
the general settings of your PivotChart. This group also displays the name
of the currently selected PivotChart.
Active Field Accessing the Value Field Settings dialog box, expanding or collapsing
hierarchies in your PivotCharts, and drilling up or down in PivotCharts
created from databases.
Filter Inserting a slicer or timeline and managing filter connections.
Data Refreshing PivotChart data and changing the data source for the PivotChart.
Actions Clearing filtering and moving the PivotChart to a different sheet in your
workbook.
Calculations Configuring PivotChart calculations and relationships.
Field Buttons
Use the field buttons in a PivotChart to filter and sort the data in your PivotChart. Selecting the Field Buttons
Filter button opens a drop-down menu where you can choose which unique items to filter your
PivotChart on. This works exactly the same as the filter field that sits above a PivotTable.
Use any Legend or Axis button to open a drop-down menu that allows you to sort and filter each
field individually. Again, these drop-down menus contain the same sorting and filtering functionality
as when you sort and filter fields in a PivotTable.
Figure 3-6: Use the field buttons in the PivotChart to filter and sort the data in your PivotChart.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Manipulate PivotChart Data.
ACTIVITY 3-2
Manipulating PivotChart Data
Scenario
The sales manager at Leaps & Bounds has come to you with another request for a chart. She wants a
chart that shows bookings per travel agent for January 2015, with the ability to narrow the data
down by region. The first region she'd like to see is Africa. You already have a PivotChart set up
from her previous request, so you need to restructure the PivotChart before you can move forward
with the analysis.
TOPIC C
Format a PivotChart
With PivotTables, you can apply a variety of formatting options to enhance your data analytics. With
PivotCharts, you are summarizing your data visually, so it's important to use layouts and colors that
represent your data in ways that make it easy for users to interpret what the charts are portraying. In
this topic, you will format a PivotChart.
Chart Elements
Chart Elements Chart elements are the individual objects that can appear on charts that convey some level of
information about the chart's data to a viewer. Chart elements can include axes, axis titles, a chart
title, data labels, gridlines, trend lines, and a legend, among others. Each chart element serves a
different role in visually communicating information about the data and trends.
Figure 3-7: Chart elements help the audience interpret chart data.
The following table identifies the types of commands in the various groups on the Design tab.
Chart Layouts Adding or removing individual chart elements and quickly configuring the
display of all chart elements according to predefined configurations.
Chart Styles Quickly formatting a chart by selecting a set of predefined chart colors or a
predefined chart style.
Data Switching row and column data and selecting the data source.
Type Changing the chart type.
Location Moving the chart to a different sheet in your workbook.
The following table identifies the types of commands in the various groups on the Format tab.
Current Selection Selecting particular chart elements and accessing the Format task pane.
Insert Shapes Inserting or changing shapes on PivotCharts.
Shape Styles Configuring formatting options for chart elements.
WordArt Styles Configuring formatting options for chart text.
Arrange Arranging the front-to-back placement of chart elements and configuring
the orientation of chart elements.
Size Changing the size of charts and chart elements.
Figure 3-10: The Format task pane displays different sets of commands and options depending
on which chart element you currently have selected.
The following table describes the various elements of the Format task pane.
Title Changes to reflect the chart element that is currently selected in the
PivotChart.
Task Pane Options Allows you to move, resize, or close the Format task pane.
drop-down arrow
Options drop-down Opens a drop-down menu that allows you to select a different chart
arrow element to format. You can also change the element by selecting a
different element in the PivotChart itself.
Primary tabs Divide the formatting commands and options into high-level groups,
usually between object and text formatting tasks.
Secondary tabs Divide the formatting commands and options at a more detailed level
than the primary tabs. These tabs change depending on the currently
selected chart element.
Command sections Task-specific sections that you can expand or collapse to view the specific
commands and options.
Commands and Enable you to apply formatting options to the chart element that is
options currently selected.
Figure 3-11: Use the chart formatting buttons to quickly access common formatting commands.
The following table describes the options available from each of the chart formatting buttons.
Item Description
Chart Elements Opens a menu that allows you to toggle the display of various chart
button elements on or off.
Chart Styles button Opens a gallery of chart styles and color palettes.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Format a PivotChart.
ACTIVITY 3-3
Formatting a PivotChart
Scenario
You have been working on a PivotChart that your colleague will present at an upcoming meeting.
To make it easier to read during the presentation, you will format the PivotChart.
Summary
In this lesson, you learned how to create a PivotChart to represent data graphically based on an
underlying PivotTable, as well as manipulate its data and format the chart itself. PivotCharts help
you present data in a professional, user-friendly format and speed up the time needed for data
analysis.
Encourage students to
use the social What tasks that you typically perform would PivotCharts help you complete more effectively?
networking tools A: Answers will vary, but most students may say that PivotCharts help when you are analyzing data in
provided on the CHOICE similar ways and presenting that data at a high level to larger groups of people. Also, you are able to
Course screen to follow quickly see the data visually when compared to a PivotTable.
up with their peers after
the course is completed How could you utilize PivotCharts in your presentations?
for further discussion
and resources to support A: Answers will vary, but most students may say that you are able to change the data on the PivotChart
continued learning. during the presentation with slicers or timelines without needing to create a lot of charts beforehand.
Note: Check your CHOICE Course screen for opportunities to interact with your classmates,
peers, and the larger CHOICE online community about the topics covered in this course or
other topics you are interested in. From the Course screen you can also access available
resources for a more continuous learning experience.
Course Follow-Up
Congratulations! You have completed the Microsoft® Office Excel® 2016: Data Analysis with PivotTables
course. In this course, you practiced the skills needed to create and manage PivotTables and
PivotCharts effectively. Now you can use Excel to interpret and summarize large amounts of data
quickly, providing powerful data analysis and actionable intelligence for your organization.
What's Next?
Logical Operations offers several courses related to the Microsoft Excel application, including
Microsoft® Office Excel® 2016: Part 3 (Second Edition). In addition, you can further your data analysis
with the Microsoft® Office Excel® 2016: Data Analysis with PowerPivot course.
You are encouraged to explore Excel PivotTables further by actively participating in any of the
social media forums set up by your instructor or training administrator through the Social Media
tile on the CHOICE Course screen.
Course Follow up
Solutions
6. What might you do to make this PivotTable easier to understand and interpret?
A: One significant improvement would be to show actual names for destinations and agents
instead of numbers.
Students will make this improvement in the next activity.
4. For each region, which group is generally responsible for more sales revenue—non-members
("N") or members ("Y") of the travel program?
A: Sales totals in each region are greater for non-members than for members.
5. How might you compare the number of transactions by non-members to the number of
transactions by members?
A: Drag Bookings→Amount to VALUES, and summarize the new value by Count.
If there is time, have students try this. It shows that there are significantly more sales to non-
members than to members.
4. Which region did customers spend the most money booking in 2015?
A: North America, with $43,362,038 booked on travel to this region in 2015.
7. Which region was the most popular travel destination that was booked in 2015?
A: North America, with 5,122 trips booked in 2015.
10. What percentage of trips were booked to the most popular region in 2015?
A: 51.15 percent of trips were taken to North America in 2015.
100 | Microsoft® Office Excel® 2016: Data Analysis with PivotTables
3. Which region has the largest percentage of its bookings for 21-30 days?
A: Oceania/Australia, with 39.11 percent of trips to that region booked for 21-30 days.
6. In the Oceania/Australia region, which city has the most trips booked for 21-30 days?
A: Melbourne, with 34 trips booked for 21-30 days.
8. What are the top 5 destination cities in the United States in 2016?
A: 1. Charlotte, 2. Newark, 3. Palm Springs, 4. Baltimore, 5. Orlando (tied with Memphis)
Solutions
Glossary
pivoting
In Excel, a form of data manipulation that
can take a column of data and pivot it into
a row, and vice versa.
PivotTable
A dynamic Excel data object that enables
users to perform data analysis by
reorganizing and summarizing data.
range
A block or group of cells in a worksheet.
Index
C slicers 53
timelines 55
Change PivotTable Data Source dialog box
formatting PivotTables
70
Layout group 63, 64
chart elements 90
New PivotTable Style dialog box 65
Connection Properties dialog box
PivotTable Style Options 65
Definition tab 72
PivotTable styles 65
Usage tab 70
Create PivotTable dialog box 11
Create Relationship dialog box 24 G
custom calculated fields 41 Grouping dialog box 48
D I
data Import Data dialog box 30
clean 3 Insert Calculated Field dialog box 41
duplicate 4 Insert Slicers dialog box 53
gap and blank cells 5 Insert Timelines dialog box 55
refresh 69
transactional 2 M
Data Connection Wizard 31
Data Model 22 Manage Relationships dialog box 24
data sources
external 2, 29 N
local 2 named tables 23
E O
Existing Connections dialog box 32 organizing data
expand and collapse feature 46
F Group and Ungroup feature 47
Filter Connections dialog box 56 sorting 46
filtering data
FILTERS area 51 P
label and value filters 52 PivotCharts
manual filters 51 chart elements 90
104 | Microsoft® Office Excel® 2016: Data Analysis with PivotTables
Q
Quick Explore feature 57
R
range 2
Recommended PivotTables feature 12
Refresh menu options 69
relationship 4
S
Select Data Source window 29
Select Table dialog box 30
Show Values As options 39
slicers
overview 53
Slicer Tools contextual tab 54
sorting data 46
Summarize Values By functions 39
T
table 2
timelines
overview 55
Timeline Tools contextual tab 56
Index
091066S rev 1.0