C - Manuals - Excel - Excel 2016 Data Analysis With Power Pivot PDF
C - Manuals - Excel - Excel 2016 Data Analysis With Power Pivot PDF
Microsoft® Office
Excel® 2016:
Data Analysis with
Power Pivot
Microsoft® Office
Excel® 2016:
Data Analysis
with Power Pivot
Microsoft® Office Excel® 2016: Data
Analysis with Power Pivot
Part Number: 091067
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
Power Pivot
We are now living in the age of big data. Data is being collected all the time and for
increasingly detailed transactions. This can lead to an overwhelming amount of data, which
brings about a need for people who can analyze large amounts of data quickly. Fortunately,
Excel provides Power Pivot to help you organize, manipulate, and report on your data in
the best way possible. Since a tool is only as good as the person using it, it is important to
gain a solid understanding of Power Pivot to maximize your effectiveness when analyzing
data.
Course Description
Target Student
Students taking this course are experienced Excel users who are seeking to advance their
data-analysis capabilities by using Power Pivot.
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 and analyzing basic PivotTables. You can obtain this level of skills and knowledge
by taking the following Logical Operations courses:
• Microsoft® Office Excel® 2016: Part 1 (Second Edition)
• Microsoft® Office Excel® 2016: Part 2 (Second Edition)
• Microsoft® Office Excel® 2016: Data Analysis with PivotTables (recommended)
Course Objectives
Upon successful completion of this course, you will be able to use Power Pivot along with
Excel 2016 to analyze data from a variety of sources.
You will:
• Get started with Power Pivot.
• Visualize Power Pivot data.
• Work with advanced functionality in Power Pivot.
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:
• Enable the Power Pivot add-in and navigate within its interface.
• Manage data relationships.
Lesson Introduction
Today's business-intelligence tasks require that you process internal and external data from a
wide variety of sources, including the cloud, data services, sales automation tools, customer
relationship management systems, and so forth. While there are dedicated business-
intelligence applications, many organizations are finding that many of their needs are met
using tools provided in Microsoft® Office. You may already use Excel® PivotTables and
PivotCharts to create your own reports and data dashboards, but you may have experienced
some of Excel's limitations, such as the amount of data you can process and what you can
do with data from different sources. Power Pivot overcomes many of these limitations,
enabling you to create more sophisticated models and perform powerful data analysis right
within the Excel interface. To get started using Power Pivot with Excel, there are some
setup tasks you need to perform.
2 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
TOPIC A
Enable and Navigate Power Pivot
Perhaps you've heard of Power Pivot, but don't know how to access it. Or you've seen Power Pivot,
but are not very familiar with its interface. In Excel, you don't have access to Power Pivot unless
you enable it. In addition, being able to successfully navigate Power Pivot's interface enables you to
take advantage of the powerful features of the tool. In this topic, you will enable the Power Pivot
add-in and navigate within its interface.
Power Pivot
Power Pivot is an add-in built by Microsoft that you can use to create sophisticated relationships
among various data sources and perform powerful data analysis. It is built into Excel 2016 and just
needs to be enabled.
Power Pivot builds on capabilities provided directly in Excel, but extends them to provide additional
capabilities. Power Pivot provides additional user interface components that you must get familiar
with, but many aspects of the Power Pivot user interface are similar to features you've used if you've
worked with PivotTables in Excel.
Power Pivot enables you to work with massive volumes of data, beyond the normal limits of Excel.
With Power Pivot, Excel can process millions of rows of data in practically the same time it takes to
process thousands of rows. And this processing speed is the same no matter where the data source
is located.
Power Pivot also enables you to combine data from disparate sources to work with all at once. For
example, if you want to analyze data using tables from a database, a table in Excel, and a text file,
that's not a problem. Excel enables you to analyze them all within the same report. There is no
separate Power Pivot or Data Model file; the reporting and data connections are all saved right
within one file, the XLSX file. Additionally, as working in Power Pivot makes no changes to the
source data, there is no concern that you will introduce errors into it.
With Power Pivot, you can use the Excel tools and features that you are already familiar with, in
addition to powerful new analytical capabilities such as adding formulas to a PivotTable, which
adjusts with the analysis, and a new formula language called Data Analysis Expressions (DAX)
specifically meant to work with columns and tables of data. Power Pivot is available in the
Microsoft® Office Professional Plus and Microsoft® Office 365™ Professional Plus editions, and in
the standalone edition of Excel 2016.
Excel Add-Ins
Add-ins are supplemental programs for Microsoft Office applications that provide additional features
and functionality not available in a standard installation. Some add-ins, such as the Analysis ToolPak
and Power Pivot, come installed with Excel and are simply inactive by default. You can download
other add-ins from Microsoft or other sources and then activate them. Alternatively, you can
develop custom add-ins if you have the programming skills to do so. Add-ins must be enabled for
you to have access to their functionality.
There are different types of Excel add-ins, including Excel add-ins and Component Object Model
(COM) add-ins, among others. Power Pivot is a COM add-in. COM add-ins typically extend the
functionality of Excel for a custom task.
Figure 1-1: Use the Add-Ins tab to view and manage your Excel add-ins.
The following table describes some of the key elements of the Add-Ins tab.
Active Application View a list of all add-ins currently installed and enabled on your
Add-ins section computer.
Inactive Application View a list of all add-ins that are currently installed on your computer, but
Add-ins section are disabled.
Add-in information View detailed information about the currently selected add-in.
Manage drop-down Access the dialog boxes for the various add-in types, where you can
menu enable or disable add-ins.
The following table identifies the types of commands in the various groups on the Power Pivot tab.
You cannot edit source data directly in Power Pivot. However, you can add columns and fields to
the Data Model using calculations. The bottom portion of the Data view is called the Calculation
Area, where you can create new fields of data using calculations. If your source data is updated,
simply refresh the data in Power Pivot to reflect the changes.
Diagram View in the
Power Pivot Window
The following table describes the various components of the Power Pivot window.
Component Description
Ribbon Displays commands and options that are specific to working with Power
Pivot.
Formula Bar Enables you to manually create and edit calculations.
Table Area Displays the data contained in the currently selected table.
Calculation Area The editable portion of the Data View, where you can view and manage
calculations.
Table tabs Enable you to switch between tables.
The following table identifies the types of commands in the various groups on the Home tab of the
Power Pivot window.
Clipboard Copying and pasting data in the same table or between tables.
Get External Data Adding data to the Data Model from sources outside of the current
workbook.
Refresh Refreshing the data in the Data Model.
PivotTable Creating reports using the data in the Data Model.
Formatting Setting data types and formatting data.
Sort and Filter Sorting and filtering data within the tables.
Find Finding data within the tables.
Calculations Applying aggregate calculations and creating key performance indicators.
View Toggling between the Data View and the Diagram View, and toggling
hidden objects and the Calculation Area on and off.
The following table identifies the types of commands in the various groups on the Design tab in
the Power Pivot window.
Columns Working with columns, including adding, deleting, freezing, and resizing
them.
Calculations Inserting functions and changing the calculation mode.
Relationships Creating and managing table relationships.
Table Properties Accessing the Edit Table Properties dialog box.
Calendars Marking a table as a date table and managing date table settings.
Edit Undoing and redoing actions.
The following table identifies the types of commands in the various groups on the Advanced tab in
the Power Pivot window.
Perspectives Creating, selecting, and managing views of the Power Pivot data.
Show Implicit Viewing the calculated fields that Excel automatically creates when you
Measures add fields to the VALUES area of the PivotTable Fields or PivotChart
Fields task pane.
Summarize By Changing the default summary function for a field when it is added to the
VALUES area of the PivotTable Fields or PivotChart Fields task
pane. The default option is usually to sum the field, but you can change it
to any of the following options: Sum, Count, Min, Max, Average,
Distinct Count, or no summary at all.
Reporting Properties Setting properties that affect report design, such as the list of fields that
are automatically added to a Power View report, and the grouping
behavior of detail rows.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Enable and Navigate Power Pivot.
ACTIVITY 1-1
Enabling and Navigating Power Pivot
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 supervisor has asked you to analyze travel bookings data
from 2015. Since you will be using Power Pivot to run the analysis, you decide to enable Power
Pivot in Excel and then open the Power Pivot window.
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 a new blank workbook in Excel.
a) Launch Excel 2016 and press Esc to open a blank workbook.
The students are
2. Enable the Power Pivot add-in. creating a blank
a) Select File→Options. workbook because it is
b) In the Excel Options dialog box, select the Add-Ins tab. the most direct way to
access the File tab. It is
c) At the bottom of the dialog box, from the Manage drop-down menu, select COM Add-ins and then
not necessary to create
select Go.
a workbook to enable
d) In the Add-Ins dialog box, check the Microsoft Office Power Pivot in Microsoft Excel 2016 check box Power Pivot.
and then select OK.
Note: The Power Pivot add-in is not workbook-specific. Once Power Pivot is
enabled, it is enabled for all workbooks.
TOPIC B
Manage Data Relationships
Before you can analyze and report on your data, you must first get the data into Power Pivot to
work with it. Excel offers quick and easy importing options no matter where your source data is
stored. Then, for reporting to be accurate and function well, you must prepare the data for analysis
by setting up relationships among tables and creating hierarchies. In this topic, you will import data,
create relationships among the imported data tables, and create a hierarchy within a table.
Data Sources
Data Sources Data sources for Power Pivot include tables within your current workbook, other Excel workbooks,
text files, and relational databases, such as Microsoft Access® and SQL Server®. In Power Pivot,
you can add and update data by using the commands in the Tables group on the Power Pivot tab.
To set up connections with data sources other than tables in your current Excel workbook, use the
Table Import Wizard on the Home tab of the Power Pivot window.
Figure 1-8: You can set up your data sources for Power Pivot using either the Add to Data Model
or Get External Data command.
data source, such as the location of the data source and which tables you want to import. You can
access the Table Import Wizard by selecting the Get External Data button on the Home tab of
the Power Pivot window.
Figure 1-9: Use the Table Import Wizard to import data from sources other than your current
Excel spreadsheet.
Diagram View
Once you've imported data into the Data Model, Power Pivot enables you to view and interact with Diagram View
the Data Model using the Diagram view. The table diagrams are located in the central workspace.
Each table diagram includes the table title and the fields within that table. You can drag the table
diagrams around the workspace to arrange them, along with using the Minimap toolbar to aid you.
The currently selected table is highlighted in blue. When you select a table diagram, two buttons
appear in the upper-right corner of the diagram. You can use these diagram buttons to create
hierarchies among the fields in the table and to enlarge the view of the selected diagram.
Relationships among the tables are indicated by arrows among the table diagrams. A currently
selected relationship is highlighted in blue and indicates the two fields in the tables that are related.
You can access Diagram view by selecting the Diagram View button in the View group on the
Home tab of the Power Pivot window.
Component Description
Reset Layout button Enables you to reset the layout of the table diagrams in the central
workspace to their default locations.
Display options Enable you to toggle table elements on and off, including columns,
calculated fields, hierarchies, and KPIs.
Minimap toolbar Aids you in arranging the table diagrams in the central workspace.
Table diagrams Display each table title and the fields within each table.
Diagram buttons Enable you to create hierarchies among the fields in the table and to
enlarge the view of the selected diagram.
Relationships
The Data Model in Excel 2016 enables you to create a relational database consisting of multiple
tables. To report on this data, you must first indicate to Excel how the data among those tables is
related. You can do this by creating relationships between tables. A relationship is a connection
between two tables of data, based on a common column that must exist in each table.
You can use Power Pivot to create and manage the relationships in the Data Model. Relationships
are based on columns in each data table that contain the same data. For example, you may have a
Transactions table and a Customers table that both contain a column for the customer ID.
Excel's Data Model supports two types of relationships: one-to-one and one-to-many. The
relationship between the Customers and Transactions tables is a one-to-many relationship. Each
customer can have multiple transactions, but each transaction cannot have multiple customers. On
the other hand, suppose you have an Addresses table, where each address can belong to only one
customer. This would be a one-to-one relationship.
Figure 1-12: Use the Manage Relationships dialog box to create, edit, and delete relationships
among data tables.
Hierarchies
Hierarchies A hierarchy is a list of columns that are considered a single item when used in a PivotTable or
PivotTables and PivotChart report. Creating a hierarchy in Power Pivot can be very useful when you are working
PivotCharts are with reports and are drilling into your data. For example, if you have geographic data, you could
discussed in more detail create a hierarchy that starts with country that drills down to state and city. In the example shown in
in the "Visualizing Power the following figure, there is a geographic hierarchy in the Customer_Info table and a hierarchy
Pivot Data" lesson. based on service in the Transactions table.
Figure 1-13: Hierarchies can be created and edited in the Diagram view of the Power Pivot
window.
A hierarchy appears as a single object in the PivotTable Fields or PivotChart Fields task pane. It
does not replace the individual fields, so you can choose to use either the individual field or the
hierarchy in your report. An advantage to creating a hierarchy in Diagram view is that it enables
you to define the hierarchy once and then use it in multiple reports, instead of defining it in each
report you create.
When you create a hierarchy in the table diagram, it is important to order the fields in descending
order. This indicates to Excel how to drill up and down in the data. You can reorder the fields in the
hierarchy at any time by dragging the fields up or down within the hierarchy. In addition, you can
rename the fields within the hierarchy. Their source names will remain to the right in parentheses,
unless you choose to hide them.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Manage Data Relationships.
ACTIVITY 1-2
Managing Data Relationships
Data Files
C:\091067Data\Getting Started with Power Pivot\LeapsBounds-Travel.xlsx
C:\091067Data\Getting Started with Power Pivot\LeapsAndBounds_Database.accdb
Scenario
To use Power Pivot to analyze the travel bookings data for Leaps & Bounds, you need to import the
transaction and agent tables from Microsoft Access into Power Pivot. You will also add the
Destinations table that is already in your workbook to the Data Model. Once this is done, you
realize that you need to create relationships among the tables. Finally, since geography is the most
important criteria you need to analyze, you decide to create a geographic hierarchy for use in
reporting.
Before beginning this
activity, we recommend
that you explain the 1. Open and save a copy of the workbook.
various data sources, a) In Excel, open C:\091067Data\Getting Started with Power Pivot\LeapsBounds-Travel.xlsx.
including what
information is contained b) If necessary, maximize the Excel 2016 application by selecting the Maximize button in the
in each table and how upper-right corner of the application.
they relate to each other.
c) Save the document in the current directory (C:\091067Data\Getting Started with Power Pivot) as
See the Presentation
My_LeapsBounds-Travel.xlsx
Tips section in the front
of the course book for
more information. 2. Use the Table Import Wizard to import data from Microsoft Access.
a) Select Power Pivot→Manage.
b) In the Power Pivot window, on the Home tab, select Get External Data→From Database→From
Access.
c) In the Table Import Wizard, on the Connect to a Microsoft Access Database screen, next to
Database name, select Browse.
d) In the Open dialog box, navigate to C:\091067Data\Getting Started with Power Pivot, select
LeapsAndBounds_Database.accdb, and then select Open.
e) At the bottom of the Connect to a Microsoft Access Database screen, select Next.
f) In the Table Import Wizard, on the Choose How to Import the Data screen, verify that Select from a
list of tables and views to choose the data to import is selected. Then select Next.
g) On the Select Tables and Views screen, check the check boxes for Agent_Info and Bookings.
If students receive a
security message in their
Excel workbooks, direct
them to select Enable
Content, both here and
whenever it appears
throughout the course's
activities. The
appearance of this
message depends on h) At the bottom of the Select Tables and Views screen, select Finish.
your specific setup.
i) On the Importing screen, wait for the Success message and then select Close.
b) To view all table diagrams on the screen, on the Minimap toolbar, select the Fit to Screen icon.
c) Move the table diagrams closer to each other by dragging the title bar of each diagram.
d) If you need to enlarge the table diagrams for ease of reading, on the Minimap toolbar, use the Drag
e) To view all of the fields in each table diagram, select the desired border of the diagram and drag it
outward.
The table diagrams might be arranged similar to the following.
5. Use the Create Relationship dialog box to create a relationship between the Bookings and Agent_Info
tables.
a) Select Design→Relationships→Create Relationship.
b) In the Create Relationship dialog box, from the Table 1 drop-down menu, select Bookings.
c) From the Table 1 Columns list, select Agent#.
d) From the Table 2 drop-down menu, select Agent_Info.
e) From the Table 2 Columns drop-down menu, verify that Agent# is selected.
f) Select OK.
g) To verify that the relationship was created successfully, position the mouse pointer over the arrow
between the Bookings and Agent_Info tables. Ensure that Agent# is highlighted in both tables and
that the arrow is going from the Bookings table to the Agent_Info table.
Note: Since the relationship between the Destinations and Bookings tables is
one-to-many, you drag the Destination# field in the Bookings table to the
Destination# field in the Destinations table.
c) To verify that the relationship was created successfully, select the arrow between the Bookings and
Destinations tables and position the mouse pointer over the arrow. Ensure that Destination# is
highlighted in both tables and that the arrow is going from the Bookings table to the Destinations
table.
c) If necessary to view all of the fields, enlarge the Destinations table diagram by dragging the lower-
right corner of the diagram downward and to the right.
Summary
In this lesson, you enabled the Power Pivot add-in in Excel so that it is available to work with. You
then navigated Power Pivot's interface, including the Data view and Diagram view. Finally, you
worked with the Data Model to prepare your data for reporting by importing data, creating
relationships among tables, and creating a hierarchy for your data.
Encourage students to
When would you need to bring data in from various other data sources? Where would the data be coming use the social
from? networking tools
A: Answers will vary, but students will likely mention combining data from a database with other provided on the CHOICE
information such as data in Excel workbooks. Course screen to follow
up with their peers after
How will Power Pivot help you to work with the Data Model? the course is completed
for further discussion
A: Answers will vary, but most students will say that being able to see all of the data, define relationships, and resources to support
and create hierarchies directly in Excel saves time and effort. Being able to complete these tasks continued learning.
within one application rather than having to set the data up beforehand is beneficial.
When would creating a hierarchy in your data be helpful in completing your daily tasks?
A: Answers will vary. Some students will mention that creating a hierarchy makes it easier to drill up and
down in data that is geographic or contains other hierarchical data such as department structure or
product information. Some students may mention that you can use a single object instead of dragging
multiple fields in and out of a PivotTable.
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:
• Create a Power Pivot report.
• Create calculations in Power Pivot.
Lesson Introduction
Now that you have Power Pivot enabled and have worked with the Data Model, you are
ready to visualize your Power Pivot data into reports such as tables and charts. This enables
you to organize data for easier analysis. Once you've created a report, you may realize that
you want to view information in a specific way that you don't readily have available in your
data. Usually, though, you already have the pieces you need and they just need to be
manipulated in a different way. This is where calculations are useful. By using the data you
already have and applying calculations to it, you can add data to the Data Model to enhance
your reporting.
24 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
TOPIC A
Create a Power Pivot Report
Viewing rows and rows of data in disparate tables is exhausting, and it is nearly impossible to make
any sense out of it. Data becomes meaningful only when you create a report, because you are able to
organize and manipulate the data in ways that you can better analyze. In this topic, you will create a
Power Pivot report using the data in your Data Model.
PivotTables
PivotTables From the Power Pivot window, you can create either a PivotTable or a PivotChart. A PivotTable is a
dynamic Microsoft® Excel® data object that enables users to perform data analysis by reorganizing
and summarizing data, as shown in this example.
With Power Pivot, you can quickly and easily analyze massive amounts of data from different
sources in the same PivotTable report. You can also define hierarchies, which enable you to quickly
drill up and down in your data and make full use of the Quick Explore feature. Also, Power Pivot
enables you to add nearly any formula to a PivotTable and have it adjust automatically.
pane. Each table in the task pane not only contains its fields, but also any calculated columns,
calculated fields, hierarchies, and/or key performance indicators that you have created in the Data
Model.
Note: If you choose to drag more than one field into an area, Excel creates a hierarchy in the
PivotTable, with fields on top of the area representing higher levels in the hierarchy. However, if
you are constantly using the same hierarchy in your reporting, it is more convenient to create a
hierarchy in the Diagram view of the Power Pivot window. This creates a permanent hierarchy
in the Data Model that you can drill into.
Creating hierarchies in
the Power Pivot window
is covered in more detail
in the "Getting Started
with Power Pivot"
lesson. Creating
calculated columns,
calculated fields, and
key performance
indicators will be
covered later in the
course.
Point out the Service
hierarchy in the
PivotTable Fields task
pane. It is located under
the Transactions table
as a separate object in
the table. The rest of the
fields in the Transactions
table are listed under the
More Fields heading.
PivotCharts
A PivotChart is an interactive, graphical representation of numeric values and relationships among PivotCharts
those values. With Power Pivot, you can create stand-alone PivotCharts that are not linked to an
underlying PivotTable. This enables you to create a dashboard of charts that combine data from
various sources that you can manipulate at a moment's notice.
Power Pivot enables you to quickly and easily analyze massive amounts of data from different
sources in one or multiple PivotCharts. Also, Power Pivot enables you to add any formula to a
PivotChart and have it adjust automatically.
Note: The chart's functionality is similar to a regular Excel chart, with the addition of field
buttons. You can use the field buttons in a PivotChart to filter and sort the data in your
PivotChart.
The following table describes the reporting options found on the PivotTable menu.
Option Description
Option Description
PivotChart Inserts a PivotChart into an Excel spreadsheet.
Chart and Table Inserts a PivotChart and a PivotTable side by side into an Excel
(Horizontal) spreadsheet. The PivotChart and PivotTable are not linked, meaning that
you can work with them separately.
Chart and Table Inserts a PivotChart above a PivotTable into an Excel spreadsheet. The
(Vertical) PivotChart and PivotTable are not linked, meaning that you can work
with them separately.
Two Charts Inserts two PivotCharts side by side into an Excel spreadsheet.
(Horizontal)
Two Charts (Vertical) Inserts two PivotCharts, one above the other, into an Excel spreadsheet.
Four Charts Inserts four PivotCharts, in a two-by-two format, into an Excel
spreadsheet.
Flattened PivotTable Inserts a flattened PivotTable into an Excel worksheet.
Figure 2-6: Use the Create Report dialog box to insert a report into an Excel spreadsheet using
your Power Pivot data.
Quick Explore
The Quick Explore Whenever your data is in the Excel Data Model, you have access to a feature called Quick Explore.
Feature Quick Explore helps you navigate to data on different levels and acts like a filter when you drill
down. Quick Explore works hand in hand with the defined hierarchies that you create in the Data
Model. The hierarchies are how Excel knows which fields to drill up or down to, which is yet
another advantage of creating hierarchies in the Data Model.
The Quick Explore button appears whenever you select an item in a field, either in a PivotTable or
a PivotChart. This button opens the Explore dialog box. On the left side of the Explore dialog
box, the tables in the Data Model are displayed. Use the drop-down arrows to access the field lists
for each table. On the right side, you can drill to specific data that you select from the left pane, or,
if you have data hierarchies, you can drill up or down in the data.
For example, the PivotTable in the figure shown contains columns of countries in North America.
By using Quick Explore for Canada, you can drill down into cities in Canada or drill up into
regions.
Figure 2-7: Use Quick Explore to drill up and down in your data.
Slicers
When you are creating a dashboard with PivotTables and/or PivotCharts in your workbook, you'll Slicers
likely want to filter on multiple entries. 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 and PivotCharts. You can create a slicer out of any of the fields in the
Data Model, 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 re-activate 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. You may want to do this when you have multiple dashboards
in the same workbook that you want affected by the same filter. The original slicer and the copies
remain linked, so whatever filters you apply to one of them affect all of the copies.
Figure 2-8: Use a slicer to quickly and easily apply a filter to your PivotTables and PivotCharts.
Figure 2-9: Use the Insert Slicers dialog box to create slicers for a PivotTable or PivotChart.
Note: To distinguish PivotTables and PivotCharts from one another in the Report
Connections dialog box, it is helpful to name them. To name a PivotTable, select the desired
PivotTable, select PivotTable Tools→Analyze→PivotTable, and, in the PivotTable Name
box, type in a name for your PivotTable. To name a PivotChart, select the desired PivotChart,
select PivotChart Tools→Analyze→PivotChart, and, in the PivotChart Name box, type in a
name for your PivotChart.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a Power Pivot Report.
ACTIVITY 2-1
Creating a Power Pivot Report
Data File
C:\091067Data\Visualizing Power Pivot Data\LeapsBounds-Travel2.xlsx
b) In the Power Pivot window, select Home→PivotTable drop-down arrow→Chart and Table
(Horizontal).
Note: Some Excel command buttons are split, meaning there are two separate
buttons you can select independently. This is often the case with commands
that have multiple options accessible by selecting a drop-down arrow. The
PivotTable command button is an example of this, as is the Paste command
button in the Clipboard group on the Home tab. For these commands, you will
be directed either to select just the button, which will be indicated by "Select
Home→Clipboard→Paste" or, if necessary, you will be directed to select the
drop-down arrow, which will be indicated by "Select Home→Clipboard→Paste
drop-down arrow→Paste Special." This convention will be used for the rest of
the book.
c) In the Create PivotChart and PivotTable (Horizontal) dialog box, verify that New Worksheet is
selected and then select OK.
3. Structure the PivotTable to answer the question "Which travel agent's customers spent the most on
travel in 2015?"
a) Select the PivotTable.
Students may need to
scroll to the right to see Note: You can tell that a PivotTable is selected if you can see the PivotTable
the PivotTable. Tools contextual tab. If you cannot see the contextual tab, then select any cell
within the PivotTable.
b) In the PivotTable Fields task pane, ensure that the ALL tab is selected.
c) In the PivotTable Fields task pane, in the Choose fields to add to report section, select the arrow to
the left of Agent_Info to view the fields in that table.
Note: If the slicer appears over the PivotTable or PivotChart, drag it to the side
so that you can see all three objects without obstruction.
8. In the Agent_Name slicer, select Mitchell Barton to filter the PivotTable by Mitchell Barton.
9. Right-click cell K4 and, from the fly-out menu, select Sort→Sort Largest to Smallest to sort the amounts.
10. For Mitchell Barton, in which region was the most money spent?
A: North America with $4,327,703 spent on travel in 2015.
11. Use Quick Explore to answer the question "For Mitchell Barton, in North America, in which country was
the most money spent?"
a) In the PivotTable, select North America and then select the Quick Explore button.
b) In the Explore dialog box, select Drill Down.
12. For Mitchell Barton, in North America, in which country was the most money spent?
A: United States with $3,486,728 spent on travel in 2015.
13. Structure the PivotChart to display the amount customers spent on bookings per region.
a) Select the PivotChart.
b) In the PivotChart Fields task pane, from the Destinations table, drag Geographic Hierarchy to the
AXIS (CATEGORIES) area.
c) From the Bookings table, drag Amount to the VALUES area.
15. In the Agent_Name slicer, select Kay Adams to filter by Kay Adams.
Point out that the data in
both the PivotTable and 16. Save the file. Keep the file open.
PivotChart are being
filtered by the
Agent_Name slicer now.
TOPIC B
Create Calculations in Power Pivot
Once you have created a Power Pivot report, there may be additional information that you want to
analyze, but that you don't have already in the Data Model. Many times, you have the pieces you
need in your data, but the data just needs to be summarized or calculated in a different way.
Fortunately, with Power Pivot, you can create new columns and fields by performing calculations. In
this topic, you will create basic calculations in Power Pivot.
Calculated Columns
A calculated column is a column of data added to a table in the Data Model that is created using a Data Calculated Columns
Analysis Expressions (DAX) formula. You can create a calculated column using the Data View of
the Power Pivot window.
For example, suppose one column of the data table contains the number of days a customer booked
at a particular travel destination (Length of Stay), and another column contains the customer's cost
(Amount). A calculated column can divide Amount by Length of Stay to determine the Amount
Spent Per Day. A calculated column that accomplishes this is shown in the following figure.
As soon as you complete the calculation in the Formula Bar and press Enter, it is automatically
applied to the entire column. This means that a value is automatically calculated for each row. You
can create calculated columns based on other columns, calculated columns, or even calculated fields.
Use calculated columns when you want to place the calculated results in either the COLUMNS,
ROWS, or FILTERS area of a PivotTable, or on an axis of a PivotChart.
Possible reasons for creating calculated columns in Power Pivot, instead of in the source data, could
be that you do not have permission to edit the source data or that you are more comfortable
working with Excel rather than in the source data's application. Creating calculations in Power Pivot
keeps the source data clean, making your Excel workbook a playground for using the source data in
different ways without actually affecting the source data itself. Also, you can create calculations using
columns from multiple data sources, something that may not be possible if you are combining data
from disparate sources.
Calculated Fields
Implicit Calculated Fields A calculated field is a calculation that is computed at the aggregate level instead of row by row. There
You can mention that, in are two types of calculated fields: implicit and explicit.
previous versions of An implicit calculated field is a calculated field that Excel creates when you drag a field to the VALUES
Power Pivot, calculated
area of the PivotTable Fields task pane. You may not be aware that a new calculated field has been
fields were known as
measures.
created, since Excel automatically generates the field. However, you can view implicit calculated
fields in the Power Pivot window by selecting the Show Implicit Calculated Measures command
on the Advanced tab.
You can use implicit calculated fields in only the PivotTable or PivotChart they were created for.
Also, you can use only a standard aggregation (SUM, AVERAGE, COUNT, DISTINCT
COUNT, MAX, or MIN) for implicit calculated fields and you must use the data format defined
for that aggregation.
Explicit calculated fields reside in the Calculation Area of a table of your choosing in the Data
Model. Once calculated, the field itself displays its name. This is because calculated fields are meant
for use in the VALUES area of a PivotTable or PivotChart.
The following table describes the key elements of the Measure dialog box.
Table name drop-down Select the table in which you want to create the calculated field.
menu
Measure name text box Name the calculated field.
Description text box Enter a description of the calculated field.
Insert function button Access the Insert Function dialog box.
Check formula button Test the validity of the formula. Excel will return errors if the formula
is invalid.
Formula text box Enter a formula to create the calculated field.
Category list Choose a formatting type for the calculated field.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create Calculations in Power Pivot.
ACTIVITY 2-2
Creating Calculations in Power Pivot
Scenario
You are preparing for an upcoming presentation. You'd like to develop two charts: one that displays
the average amount spent per day per region and another that displays the number of bookings per
region. You decide to create two PivotCharts that use a geographic hierarchy you have already
created so that you can drill up and down in the data during the presentation.
To display the average amount spent per day, you decide to create a calculated column called
Amount Spent Per Day, which divides the total amount spent on the trip by the number of days.
You then use this calculated column to create a calculated field for the average amount spent per
day.
To display the number of bookings per region, you decide to create a calculated field that counts the
number of bookings. You already have your workbook open, so you can start right in on creating
the calculated column, calculated fields, and PivotCharts.
1. Create a calculated column called Amount Spent Per Day in the Bookings table.
a) Select Power Pivot→Data Model→Manage to open the Power Pivot window.
b) At the bottom of the Power Pivot window, select the Bookings table tab.
c) In the table, scroll all the way to the right if necessary to see Add Column.
d) Select Add Column.
e) In the Formula Bar, type =[Amount]/[Length of Stay] and then press Enter.
Excel creates the calculated column. Students may use the
f) To rename the calculated column, right-click the heading of the calculated column and, from the fly- AutoComplete
out menu, select Rename Column. functionality to aid them
in completing the
g) In the heading, type Amount Spent Per Day and then press Enter.
formula. Alternatively,
you could direct students
2. Format the Amount Spent Per Day calculated column.
to type =, then select the
a) Select Home→Formatting→Format : General→Currency. Amount column, then
b) On the Home tab, in the Formatting group, decrease the decimal by selecting Decrease Decimal type the division
symbol /, and then select
twice. the Length of Stay
column.
3. Create an explicit calculated field for the average amount spent per day.
a) In the Calculation Area, underneath the Amount Spent Per Day column, select the first blank cell.
Note: The calculated field has been created. It displays the name of the
calculated field and will be used in reporting.
5. Structure the first PivotChart to display the average amount spent per day per region.
a) Ensure that Chart 1 is selected.
b) In the PivotChart Fields task pane, from the Destinations table, drag Geographic Hierarchy to the
AXIS (CATEGORIES) area.
c) From the Bookings table, drag Average of Amount Spent Per Day to the VALUES area.
Note: The calculated field has been created. It displays the name of the
calculated field and will be used in reporting.
8. Structure the second PivotChart to display the number of bookings per region.
a) In the upper-left corner of the Power Pivot window, select the Switch to Workbook icon.
b) If you cannot see all of Chart 2, scroll down until you can see the entire chart.
c) Select Chart 2.
d) In the PivotChart Fields task pane, from the Destinations table, drag Geographic Hierarchy to the
AXIS (CATEGORIES) area.
e) From the Bookings table, drag Count of Booking# to the VALUES area.
9. Review the PivotChart to verify that the chart is displaying the number of bookings per region.
11. Select File→Close to close the workbook. Leave the Excel application open.
Summary
In this lesson, you created a Power Pivot report utilizing a slicer and Quick Explore so that you
could analyze data. You also used basic formulas in Power Pivot to create calculated columns and
fields for use in reporting. Being able to summarize data in a Power Pivot report is an important skill
to help you when presenting data.
You may want to show
the LearnTO Visualize In what reporting situations would you use multiple PivotCharts or a PivotChart along with a PivotTable?
the Data Model with A: Answers will vary, but most students will say that they would use these reporting options when they
Power View from the would like to show different analyses concurrently. Also, a PivotTable may best show certain
CHOICE Course screen summaries of data, while a PivotChart would better show other summaries of data, such as trends
or have students
over time. Other students may speak to different types of dashboards or scorecards they would like to
navigate out to the
create from the Data Model.
Course screen and
watch it for themselves How could slicers help you to create a dashboard in your Excel workbook?
as a supplement to your
instruction. If not, please A: Answers will vary, but most students will say that slicers are client friendly since they are easy to use
remind students to visit once set up. You can choose which slicers are shown to customize the experience for a client or
the LearnTOs for this supervisor.
course on their CHOICE
course screen after Note: To learn more, check out the LearnTO Visualize the Data Model with Power View
class for supplemental presentation from the LearnTO tile on the CHOICE Course screen.
information and
additional resources. Note: Check your CHOICE Course screen for opportunities to interact with your classmates,
Encourage students to peers, and the larger CHOICE online community about the topics covered in this course or
use the social
other topics you are interested in. From the Course screen you can also access available
networking tools
provided on the CHOICE
resources for a more continuous learning experience.
Home 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 key performance indicator.
• Work with dates and time in Power Pivot.
Lesson Introduction
Now that you have created a report from your Power Pivot data and created basic
calculations for use in those PivotTables, you are ready to work with more advanced
functionality. Often when you analyze data, you are measuring performance by comparing it
to some sort of goal or target. Additionally, you are often comparing data over time to
measure performance or to find trends. Can Microsoft® Excel® help you with these tasks?
Fortunately, Power Pivot includes specific functionalities to help you measure performance
and analyze data over time.
50 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
TOPIC A
Create a Key Performance Indicator
You have set up a PivotTable report and created calculations to use within that report, but what if
you need to measure the performance of data against a target? For example, suppose your company
requires a 30-percent profit margin on all work done and you need to analyze whether or not this
goal is being met. Or perhaps each sales agent in your department has a target amount to sell per
quarter and you need to verify if the target is being met. Fortunately, Excel provides a way to
measure performance in your data with key performance indicators.
KPIs
KPIs In Power Pivot, key performance indicators (KPIs) are visual measures of performance. Their purpose is
to help you quickly evaluate a value and status of a metric against a defined target. To create a KPI,
you need a base field, which must be a calculated field, and a target value. The KPI gauges the
performance of the values in the base field against a target value, which is defined either by an
absolute value or another calculated field.
KPIs are meant to be visualized in PivotTables, an example of which is shown in the following
figure. The KPI is evaluating the number of travel bookings sold by each agent (values located in the
second column) against a target of 940. Each agent's visual status is shown in the fourth column,
making it easy to gauge how well each agent is doing in meeting the goal. When agents reach a
booking count of 870, the color changes from red to beige, and when they reach goal, the color
changes to aqua. These ranges and indicators can be manually configured when the KPI is created,
using the Key Performance Indicator (KPI) dialog box.
In the Define status thresholds section, you can use the threshold options to choose either a linear
scale, with the target value at either end, or the target in the middle. To define the size of each range,
use the threshold slider. This example uses the linear scale. The first range contains values up to 850.
The middle range is from 850 to 925, and the upper range contains numbers above 925.
At the bottom of the dialog box, you can choose from a variety of status indicators. These are the
icons that appear in your PivotTable when you add the KPI's Status field to the VALUES area of
the PivotTable Fields task pane.
Figure 3-2: Use the KPI Status tab of the Key Performance Indicator (KPI) dialog box to configure
KPIs for your Power Pivot data.
The following table describes the key elements of the KPI Status tab of the Key Performance
Indicator (KPI) dialog box.
Measure drop-down Select a calculated field as the target for the KPI.
menu
Absolute value text Enter a value as the target for the KPI.
box
Threshold slider Define the ranges for each status icon. Use the arrows on either side of
the slider to zoom in or out.
Threshold options Choose between a linear scale, with a choice for which side should be
green, or a scale with the target value in the middle or on either end.
Select icon style Select a style of icons for your PivotTable.
section
The Descriptions Tab The Descriptions tab enables you to enter descriptions for the KPI itself, the value, status, and
target. Writing in descriptions can help you to remember what the KPI is measuring or can
communicate this information to others who may be working with the data.
KPI Fields
KPI Fields You can identify a KPI in the PivotTable Fields task pane by the stoplight icon, as shown in the
following figure. When you expand a KPI, three fields appear: Value, Goal, and Status. When you
create a KPI, Excel automatically creates these new fields for the table. You can drag any one or
several of the fields to the VALUES area of the PivotTable Fields task pane. The Value field
shows the base field values, the Goal field shows the target values, and the Status field shows the
status icons in the PivotTable.
Figure 3-4: How KPIs appear in the PivotTable Fields task pane.
The following table describes the key elements of the Manage KPIs dialog box.
Element Description
New button Opens the Key Performance Indicator (KPI) dialog box.
Edit button Opens the Key Performance Indicator (KPI) dialog box for the currently
selected KPI.
Delete button Deletes the currently selected KPI.
KPI section Lists all existing KPIs.
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Create a KPI.
ACTIVITY 3-1
Creating a KPI
Data File
C:\091067Data\Working with Advanced Functionality in Power Pivot\LeapsBounds-Travel3.xlsx
2. Create a KPI.
a) In the Excel workbook, select Power Pivot→Calculations→KPIs→New KPI.
b) In the Key Performance Indicator (KPI) dialog box, from the KPI base field (value) drop-down menu,
select Count of Booking#.
c) In the Define target value section, select Absolute value and, in the text box, type 940
d) Select anywhere in the Define status thresholds area so that Excel updates the values on the
threshold slider.
e) Drag the right-most slider to 940 and the left-most slider to 870. If necessary, to zoom in the
threshold slider, drag the arrows at either end in toward the middle of the dialog box.
f) Examine the colors that will be used to identify the three ranges of values.
• Red: Values below 870
• Beige: Values 870 or greater, but less than 940
• Aqua: Values 940 or greater
g) Select OK.
3. Insert a PivotTable.
a) To open the Power Pivot window, select Power Pivot→Data Model→Manage.
b) In the Power Pivot window, select Home→PivotTable.
c) In the Create PivotTable dialog box, verify that New Worksheet is selected and then select OK.
4. Structure the PivotTable to answer the questions "Which travel agents did not reach the minimum of
870 bookings?" and "Which travel agents booked more than 940 trips?"
a) Select the PivotTable.
b) In the PivotTable Fields task pane, from the Agent_Info table, drag Agent_Name to the ROWS area.
c) From the Bookings table, select the arrow to the left of the Count of Booking# KPI and drag Value
(Count of Booking#) and Status to the VALUES area.
Point out that the colors
of the status icons were
determined in Step 1
when students created
the KPI.
5. Which travel agents did not reach the minimum of 870 bookings?
A: Elisa Bennett, with 867 bookings
c) In the Define status thresholds area, set the value for the right slider to 925 and the left slider to 850.
Note: The easiest way to do this is to type new values directly into the text
boxes. If you try instead to drag the sliders to set them, you may have to zoom
in so the sliders don't skip over the values that you're trying to assign. The
more you zoom in, the more precision you have when setting the values. You
can zoom by dragging the arrows at either end in toward the middle of the
dialog box.
d) Select OK.
e) In the Manage KPIs dialog box, select Close.
8. Which travel agents did not reach the minimum of 850 bookings?
A: No travel agents had less than 850 bookings.
TOPIC B
Work with Dates and Time in Power Pivot
Much of your data analysis probably involves comparing data over time, especially if you are
measuring performance with a KPI. If you've worked with PivotTables before, you know that you
can group dates and use a timeline to organize and filter PivotTable data. Beyond these, Power Pivot
has functions that enable you to compare calculations over time periods.
DAX
You already know how to create basic formulas, but to work with more advanced formulas in Power DAX
Pivot, you can use Data Analysis Expressions (DAX). DAX is a formula language used in Power
Pivot. DAX is similar to the formulas that are regularly used in Excel, but DAX is designed to work
with tables and columns of data rather than individual cells. You can use DAX to create custom
calculations for calculated columns and fields.
There are three ways to create formulas using DAX. One is by using the Formula Bar. Simply type
an equal sign, followed by a function expression or name, and then any required arguments or
values. The other two ways to create DAX formulas are by using the Insert Function and Measure
dialog boxes.
Figure 3-6: Use DAX to create more complex calculations in Power Pivot.
DAX Syntax
DAX Syntax A basic DAX formula begins with an equal sign (=), which indicates to Excel that you would like to
perform a calculation. The equal sign is followed by the name of the function and then any
arguments that are a part of that function.
For example, suppose you need values in your source data itself to be rounded because of reporting
requirements. To accomplish this, you can use the DAX ROUND function to create a calculated
column that rounds the values from another column. In the following figure, the ROUND function
is being used to round the values in the Tip_Percentage column to two decimal places. The
formula begins with an equal sign, then the name of the function, and then its arguments. In this
case, the first argument is telling Excel which column's values should be evaluated (Tip
Percentage) and the second argument is telling Excel to round each value to two decimal places.
Figure 3-7: Using the ROUND function to create a calculated column whose values are rounded to
two decimal places.
You do not need to use a specific function in a DAX formula. You can always use any scalar
operator such as +, -, *, /, >, &, and so forth. Just keep in mind that you must always reference a
column or table, not an array or set of values, since DAX formulas are meant to work with tables
and columns of data rather than individual cells.
In a DAX formula, if you are referencing a column that is in the currently selected table, you may
select that column to include it in the formula, or type the column name within brackets. For
example, ROUND([Tip_Percentage], 2) specifies the column name in brackets. If you are
referencing a column that is in a different table than the one where you are writing the formula, you
must specify the table name followed by the column name in brackets. For example,
ROUND('Transactions'[Tip_Percentage], 2) specifies both the table and column names. If the
table name has spaces in it, then you must use the single quotations around the table name.
All names are case-insensitive, so TIP_PERCENTAGE and Tip_percentage would represent the
same column, and =ROUND and =round would represent the same function. Also, Excel ignores
spaces in formulas in between functions and objects, but the functions and objects must be
referenced exactly as written.
Note: When you type a function name, table name, or column name while creating a DAX
formula, the AutoComplete functionality provides a drop-down list that contains valid names
beginning with the letters you have typed. This helps you to create a DAX formula quickly and
easily.
Function Description
DAY(<date>) Returns the day of the month, a number ranging from 1 to 31.
MONTH(<datetime>) Returns the month as a number from 1 (January) to 12
(December).
WEEKDAY(<date>, Returns a number ranging from 1 to 7 identifying the day of the
<return_type>) week of a date. By default, the day ranges from 1 (Sunday) to 7
(Saturday). Use a <return_type> of 2 to start the week on
Monday.
WEEKNUM(<date>, Returns the week number for the given date and year according
<return_type>) to the <return_type> value. Use a <return_type> of 1 to start
the week on Sunday or a <return_type> of 2 to start the week on
Monday. The week number indicates where the week falls
numerically within a year.
YEAR(<date>) Returns the year of a date as a four-digit integer in the range
1900–9999.
Time Intelligence
In addition to date and time functions, Power Pivot also has 35 time intelligence functions, which Time Intelligence
do not have a parallel in Excel. Time intelligence functions aggregate and compare data by using
time periods, including years, quarters, months, and days. You can then use the calculations to
compare data over those periods in your reporting.
The following table describes the time intelligence functions that return a single date.
Function Description
FIRSTDATE (Date_Column) Returns the first date in the Date_Column specified in the
function.
LASTDATE (Date_Column) Returns the last date in the Date_Column specified in the
function.
FIRSTNONBLANK Returns the first date (or any other column value) where an
(Date_Column, Expression) expression has a non-blank value.
LASTNONBLANK Returns the last date (or any other column value) where an
(Date_Column, Expression) expression has a non-blank value.
STARTOFMONTH Returns the first date of the month in the Date_Column
(Date_Column) specified in the function.
STARTOFQUARTER Returns the first date of the quarter in the Date_Column
(Date_Column) specified in the function.
STARTOFYEAR Returns the first date of the year in the Date_Column specified in
(Date_Column, [YE_Date]) the function.
ENDOFMONTH Returns the last date of the month in the Date_Column specified
(Date_Column) in the function.
ENDOFQUARTER Returns the last date of the quarter in the Date_Column specified
(Date_Column) in the function.
ENDOFYEAR Returns the last date of the year in the Date_Column specified in
(Date_Column, [YE_Date]) the function.
The following table describes the time intelligence functions that calculate the previous or next day,
month, quarter, or year and return those dates in the form of a single column table.
Function Description
PREVIOUSDAY Calculates the previous day and returns those dates in the form
(Date_Column) of a single column table.
PREVIOUSMONTH Calculates the previous month and returns those dates in the
(Date_Column) form of a single column table.
PREVIOUSQUARTER Calculates the previous quarter and returns those dates in the
(Date_Column) form of a single column table.
PREVIOUSYEAR Calculates the previous year and returns those dates in the form
(Date_Column, [YE_Date]) of a single column table.
NEXTDAY (Date_Column) Calculates the next day and returns those dates in the form of a
single column table.
NEXTMONTH Calculates the next month and returns those dates in the form of
(Date_Column) a single column table.
NEXTQUARTER Calculates the next quarter and returns those dates in the form of
(Date_Column) a single column table.
NEXTYEAR (Date_Column, Calculates the next year and returns those dates in the form of a
[YE_Date]) single column table.
The following table describes the time intelligence functions that calculate the set of dates in the
period that is a month, quarter, or year-to-date and return those dates in the form of a single column
table.
Function Description
The following table describes the time intelligence functions that are used to shift from the set of
dates in the current context to a new set of dates.
Function Description
DATEADD (Date_Column, Returns a table that contains a column of dates, shifted either
Number_of_Intervals, Interval) forward or backward in time by the specified number of intervals
from the dates in the current context.
DATESBETWEEN Returns a table that contains a column of dates that begins with
(Date_Column, Start_Date, the Start_Date and continues until the End_Date.
End_Date)
DATESINPERIOD Returns a table that contains a column of dates that begins with
(Date_Column, Start_Date, the Start_Date and continues for the specified
Number_of_Intervals, Interval) Number_of_Intervals.
PARALLELPERIOD Returns a table that contains a column of dates that represents a
(Date_Column, period parallel to the dates in the specified dates column, in the
Number_of_Intervals, Interval) current context, with the dates shifted a number of intervals
either forward in time or back in time.
The following table describes the time intelligence functions that evaluate an expression over a
specified time period.
Function Description
TOTALMTD (Expression, Sums values from the first day of the month to the last day of the
Date_Column, [SetFilter]) month.
TOTALQTD (Expression, Sums values from the first day of the quarter to the last day of
Date_Column, [SetFilter]) the quarter.
TOTALYTD (Expression, Sums values from the first day of the year to the last day of the
Date_Column, [SetFilter], year.
[YE_Date])
The following table describes the time intelligence functions that calculate closing and opening
balances.
Function Description
Function Description
OPENINGBALANCEMONT Calculates a value at the calendar end of the month prior to the
H given month.
OPENINGBALANCEQUAR Calculates a value at the calendar end of the quarter prior to the
TER given quarter.
OPENINGBALANCEYEAR Calculates a value at the calendar end of the year prior to the
given year.
Date Tables
Date Tables To work with time intelligence functions, you need a date table in Power Pivot. A date table must
have at least one column where each row contains contiguous dates for every day of each year
included in your data. Typical columns in date tables are fiscal year, quarter, month, or period. You
can then use these in your PivotTable when you are analyzing data over time.
You may already have a date table in your relational database, which you can import into Power
Pivot, or you can create your own. Once you have a date table in Power Pivot, it is important to
designate it as such by using the Mark as Date Table action on the Design tab. This enables
dedicated date filtering in your reports. You will also need to create a relationship between the date
table and your transactions table.
Note: The name date is already a keyword in Power Pivot, so it is recommended that you name
your date table and any date columns as something other than date. For example, your date table
could be named Calendar and the date column could be named DateKey.
If your date table does not contain a date column that you need, you can always add columns by
using DAX. For example, if your date table does not contain the year, you can use the YEAR
function to create a new column for that data. The following table contains commonly used DAX
formulas that you can use to add columns of data to a date table.
Year =YEAR([date])
Month =MONTH([date])
Quarter =INT(([Month]+2)/3)
Month name =FORMAT([date],"mmmm")
Day of week =FORMAT([date],"ddd")
Access the Checklist tile on your CHOICE Course screen for reference information and
job aids on How to Work with Dates and Time in Power Pivot.
ACTIVITY 3-2
Working with Dates and Time in Power Pivot
Scenario
Your supervisor has requested that you provide a KPI comparing the total amount of bookings for
the current month to the previous month. She would like any value below 95 percent of the
previous month's total called out in yellow and any value below 80 percent of the previous month's
value called out in red. To start with, she would like the following specific questions answered:
• Which months fell below 80 percent of the previous month's total?
• Which months fell between 80 and 95 percent of the previous month's total?
First, you plan out how to structure your PivotTable to provide this information. You decide that
you will use a Year field and a MonthNumber field for the rows, and the three KPI fields for
values. Once completed, it will look something like the following PivotTable.
To create this PivotTable, you will need to create a date table and then add calculated columns for
year and month number. The KPI will be created using two calculated fields, Previous Month
Total and Current Month Total. You can create these calculated fields using time intelligence
functions. After you've created the KPI, you can then structure the PivotTable to answer your
supervisor's questions.
Note: You do not need to select any particular report or cell before creating a
calculated field. Calculated fields live in the Data Model and are included for
use in reporting in the PivotTable Fields and PivotChart Fields task panes.
c) In the Manage Measures dialog box, select New.
d) From the Table name drop-down menu, select Bookings.
e) In the Measure name text box, type Previous Month Total
f) In the Formula text box, after the = sign, type CALCULATE(SUM(Bookings[Amount]),
PREVIOUSMONTH(Calendar[DateKey]))
DAX formulas are case- g) In the Category list, select Currency and then set the decimal places to 0.
insensitive and spaces h) Select Check formula to validate the formula.
are allowed between i) When Excel generates the No errors in formula message, select OK to create the calculated field.
function names and
object names.
8. Create the calculated field Current Month Total.
Ask students why single
a) In the Manage Measures dialog box, select New.
quotes aren't necessary
around the table names b) From the Table name drop-down menu, select Bookings.
in this formula. (It's c) In the Measure name text box, type Current Month Total
because the table d) In the Formula text box, after the = sign, type CALCULATE(SUM(Bookings[Amount]),
names are single DATESMTD(Calendar[DateKey]))
words.)
Note: You may use the AutoComplete functionality to aid you in entering the
formula by double-clicking the correct item from the drop-down provided.
e) In the Category list, select Currency and then set the decimal places to 0.
f) Select Check formula to validate the formula.
g) When Excel generates the No errors in formula message, select OK to create the calculated field.
h) Select Close.
11. Structure the PivotTable to answer the question "Which months fell below 80 percent of the previous
month's total?"
a) In the workbook, select the Sheet3 worksheet and then ensure that the PivotTable is selected.
b) Clear the PivotTable of all fields by selecting PivotTable Tools→Analyze→Actions→Clear→Clear All.
c) In the PivotTable Fields task pane, ensure that the ALL tab is selected.
d) In the PivotTable Fields task pane, from the Calendar table, drag Year and MonthNumber to the
ROWS area.
e) From the Bookings table, from the Current Month Total KPI, drag Value (Current Month Total), Goal,
and Status to the VALUES area.
Note: You may need to expand the PivotTable Fields task pane to view the
entirety of the field names.
12. Which months fell below 80 percent of the previous month's total?
A: No months fell below 80 percent of the previous month's total.
13. Which months fell between 80% and 95% of the previous month's total?
A: Months 2, 4, and 10.
Summary
In this lesson, you measured performance against targets by using key performance indicators. You
also measured performance over time using both date and time functions and time intelligence
functions. Being able to incorporate performance measures into your reporting and compare data
over time enhances your ability to analyze large amounts of data quickly and easily.
You may want to show
In what specific situations would using key performance indicators help in your daily tasks? the LearnTO Define
A: Answers will vary, but some students may mention that KPIs are very helpful in sales and finance, as Custom Views Using
there are always targets to meet. Other students may mention that KPIs are a convenient alternative Perspectives from the
to using conditional formatting. CHOICE Course screen
or have students
How would using time intelligence functions help you in analyzing data? navigate out to the
Course screen and
A: Answers will vary. Some students may mention that time intelligence functions enable them to watch it for themselves
compare performance to previous time periods such as year over year, quarter over quarter, or to the as a supplement to your
same quarter during the previous year. They also enable you to recognize patterns throughout the instruction. If not, please
year and could help with staffing and planning. remind students to visit
the LearnTOs for this
Note: To learn more, check out the LearnTO Define Custom Views Using Perspectives 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
use the social
resources for a more continuous learning experience.
networking tools
provided on the CHOICE
Home screen to follow
up with their peers after
the course is completed
for further discussion
and resources to support
continued learning.
Course Follow-Up
Congratulations! You have completed the Microsoft®Office Excel® 2016: Data Analysis with Power Pivot
course. You have successfully enabled and navigated Power Pivot, worked with the Data Model,
created reports, and enhanced those reports using calculations and key performance indicators. Now
you can use Power Pivot to create complex Data Models and summarize data quickly to provide
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 PivotTables course.
You are encouraged to explore Power Pivot 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
A Commonly Used DAX
Functions
There are many Data Analysis Expressions (DAX) functions that you can use in Power
Pivot. The following are overviews of some of the more commonly used DAX functions
not directly covered in the course.
Filter Functions
Function Description
ALL( {<table> | <column>[, Returns all the values in a column or all the rows
<column[, <column>[,…]]]}) in a table and ignores any filters that might have
been applied.
CALCULATE(<expression>,<filter1> Evaluates an expression in a context that is
,<filter2>...) modified by the specified filters. It is superior to
the Excel functions of SUMIF() and SUMIFS().
The CALCULATE function is not limited to
standard aggregations such as SUM, COUNT, or
AVERAGE, but rather is an “anything” IF. The
CALCULATE function enables you to take any
aggregation function, or even a complex multi-
function expression, and quickly produce an IF
version of it.
FILTER(<table>,<filter>) Returns a table that represents a subset of
another table or expression.
Information Functions
Function Description
Logical Functions
Function Description
Function Description
Statistical Functions
Function Description
Text Functions
Function Description
Mastery Builders are provided for certain lessons as additional learning resources for this
course. Mastery Builders are developed for selected lessons within a course in cases when
they seem most instructionally useful as well as technically feasible. In general, Mastery
Builders are supplemental, optional unguided practice and may or may not be performed as
part of the classroom activities. Your instructor will consider setup requirements, classroom
timing, and instructional needs to determine which Mastery Builders are appropriate for you
to perform, and at what point during the class. If you do not perform the Mastery Builders
in class, your instructor can tell you if you can perform them independently as self-study,
and if there are any special setup requirements.
78 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
Data Files
C:\091067Data\Getting Started with Power Pivot\LeapsAndBounds.xlsx
C:\091067Data\Getting Started with Power Pivot\Bookings_Database.accdb
C:\091067Data\Getting Started with Power Pivot\Calendar.xlsx
Scenario
You are preparing to analyze bookings data for Leaps & Bounds. Since the data you
need is not in the same workbook, you'll import the data from the various sources into
Excel's Data Model. Using Power Pivot will enable you to view all the data in one
workbook. You then decide to create relationships among the tables, since this will
enable you to work with all the data in the same reports. As you familiarize yourself
with the data, you realize that the relationships between the tables are as follows.
Finally, for ease of reporting, you'll create a time hierarchy containing the Year,
Quarter, and Month fields, and a geographic hierarchy containing the Region,
Country, and City fields.
1. If Power Pivot is not yet enabled, then enable the Power Pivot add-in.
4. From the Bookings_Database.accdb Access database file, add the Bookings table to the
Data Model in your workbook.
5. From the Calendar.xlsx Excel file, add the Calendar table to the Data Model in your
workbook (using the first row as column headers).
Mastery Builders
Microsoft® Office Excel® 2016: Data Analysis with Power Pivot | 79
9. In the Calendar table, create a hierarchy called Time Hierarchy, which contains Year, Quarter, and
MonthNumber
10. In the Destinations table, create a hierarchy called Geographic Hierarchy, which contains
Destination_Region, Destination_Country, and Destination_City.
11. Save the workbook to the C:\091067Data\Getting Started with Power Pivot folder as
My_LeapsAndBounds.xlsx and close the workbook, then close Excel 2016.
Mastery Builders
80 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
Data File
C:\091067Data\Visualizing Power Pivot Data\LeapsBounds-Dashboard.xlsx
Scenario
Your supervisor has asked you to create a dashboard of interactive charts for the Leaps
& Bounds sales manager. He would like a chart to display each of the following:
• Sum of sales per region per quarter.
• Count of sales per region per quarter.
• Unique number of sales to customers per region per quarter.
• Average length of stay per region per quarter.
The sales manager would also like to be able to filter the charts by agent name, region,
country, and city.
Your completed dashboard will look similar to the following figure.
2. In the Bookings table, use the AutoSum feature to create an explicit calculated field to
count the number of sales in the Amount column.
3. In the Bookings table, use the AutoSum feature to create an explicit calculated field for
the distinct count of the Cust_Number column.
Mastery Builders
Microsoft® Office Excel® 2016: Data Analysis with Power Pivot | 81
4. In the Bookings table, use the AutoSum feature to create an explicit calculated field to find the average
in the Length of Stay column.
5. Create a report of four PivotCharts and place them in the existing Dashboard worksheet.
6. Structure the upper-left PivotChart to display the sum of sales per region per quarter.
7. Structure the upper-right PivotChart to display the count of sales per region per quarter.
8. Structure the lower-left PivotChart to display the unique number of sales to customers per region per
quarter.
Mastery Builders
82 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
9. Structure the lower-right PivotChart to display the average length of stay per region per
quarter.
10. Insert slicers for Agent Name, Region, Country, and City.
11. Arrange the slicers around the PivotCharts so that all reports are displayed in their
entirety.
13. Save the workbook to the C:\091067Data\Visualizing Power Pivot Data folder as
My_LeapsBounds-Dashboard.xlsx and close the workbook, then close Excel 2016.
Mastery Builders
Microsoft® Office Excel® 2016: Data Analysis with Power Pivot | 83
Data File
C:\091067Data\Working with Advanced Functionality in Power Pivot\LeapsBounds-KPI.xlsx
Scenario
Your supervisor has asked you to analyze the travel agents' performance by quarter. Each travel
agent had a target of $1,900,000 in bookings per quarter, with a minimum amount of $1,700,000.
Specifically, your supervisor would like you to answer the following questions:
• In the first quarter, which travel agents had less than $1,700,000 in bookings?
• In the second quarter, which travel agents had less than $1,700,000 in bookings?
• In the third quarter, which travel agents had less than $1,700,000 in bookings?
• In the fourth quarter, which travel agents had less than $1,700,000 in bookings?
3. In the Calendar table, create calculated columns for MonthNumber and Quarter.
4. Create a relationship between the Bookings (Date_Sold) and Calendar (DateKey) tables.
5. Insert a PivotTable into a new worksheet using the data in the Data Model.
6. Structure the PivotTable to show total sales amounts for each travel agent.
7. Create the KPI for quarterly sales goal to show three ranges of icons:
• Sums less than 1,700,000
• Sums of 1,700,000 or more, but less than 1,900,000
• Sums of 1,900,000 or more
8. Insert a slicer for Quarter (based on the Quarter calculated column you created in the Calendar table).
9. In the first quarter, which travel agents had less than $1,700,000 in bookings?
A: Elisa Bennett with $1,582,589 and Sandy Douglas with $1,675,246 in bookings.
10. Use the slicer to answer the question "In the second quarter, which travel agents had less than
$1,700,000 in bookings?"
11. In the second quarter, which travel agents had less than $1,700,000 in bookings?
A: Sandy Douglas with $1,601,761 in bookings.
Mastery Builders
84 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
12. Use the slicer to answer the question "In the third quarter, which travel agents had less
than $1,700,000 in bookings?"
13. In the third quarter, which travel agents had less than $1,700,000 in bookings?
A: No travel agents had less than $1,700,000 in bookings.
14. Use the slicer to answer the question "In the fourth quarter, which travel agents had less
than $1,700,000 in bookings?"
15. In the fourth quarter, which travel agents had less than $1,700,000 in bookings?
A: No travel agents had less than $1,700,000 in bookings.
16. Save the workbook to the C:\091067Data\Working with Advanced Functionality in Power
Pivot folder as My_LeapsBounds-KPI.xlsx and close the workbook, then close Excel
2016.
Mastery Builders
Solutions
10. For Mitchell Barton, in which region was the most money spent?
A: North America with $4,327,703 spent on travel in 2015.
12. For Mitchell Barton, in North America, in which country was the most money spent?
A: United States with $3,486,728 spent on travel in 2015.
5. Which travel agents did not reach the minimum of 870 bookings?
A: Elisa Bennett, with 867 bookings
8. Which travel agents did not reach the minimum of 850 bookings?
A: No travel agents had less than 850 bookings.
12. Which months fell below 80 percent of the previous month's total?
A: No months fell below 80 percent of the previous month's total.
86 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
13. Which months fell between 80% and 95% of the previous month's total?
A: Months 2, 4, and 10.
9. In the first quarter, which travel agents had less than $1,700,000 in bookings?
A: Elisa Bennett with $1,582,589 and Sandy Douglas with $1,675,246 in bookings.
11. In the second quarter, which travel agents had less than $1,700,000 in bookings?
A: Sandy Douglas with $1,601,761 in bookings.
13. In the third quarter, which travel agents had less than $1,700,000 in bookings?
A: No travel agents had less than $1,700,000 in bookings.
15. In the fourth quarter, which travel agents had less than $1,700,000 in bookings?
A: No travel agents had less than $1,700,000 in bookings.
Solutions
Glossary
A F
add-ins 2 functions
Add-Ins tab 2 date and time 61
Advanced tab 7 time intelligence 61
AutoSum feature 39
H
C hierarchies 14
calculated Home tab 6
columns 37
fields, types of 38 I
Calculation Area 4
Create Report dialog box 28 implicit calculated fields 38
Insert Function dialog box 41
Insert Slicers dialog box 30
D
Data Analysis Expressions, See DAX K
Data Model 10
data relationships key performance indicators, See KPIs
Create Relationship dialog box 13 KPI
Manage Relationships dialog box 13 defined 50
Data sources 10 fields 52
Data view 4
date tables 64 M
DAX Manage KPIs dialog box 53
defined 59 Measure dialog box 40
syntax 60
Design tab 6
Diagram view 4, 11
P
PivotChart Fields task pane 26
E PivotCharts 25
PivotTable Fields task pane 24
explicit calculated fields 38 PivotTables 24
Power Pivot
overview of 2
report options 27
90 | Microsoft® Office Excel® 2016: Data Analysis with Power Pivot
tab 3
window 4
Q
Quick Explore feature 28
R
Report Connections dialog box 31
S
slicers 29
T
Table Import Wizard 10
Index
091067S rev 1.0