100% found this document useful (2 votes)
351 views56 pages

Excel PivotTables PivotCharts

The document describes a course on using pivot tables and pivot charts in Microsoft Excel. It includes details about course materials, the course outline covering topics like structuring data and calculating values, expectations for the course, and an introductory section on why pivot tables are useful. The course aims to teach students how to organize, filter, summarize and analyze data using pivot tables and pivot charts.

Uploaded by

alexanderhfuadf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
351 views56 pages

Excel PivotTables PivotCharts

The document describes a course on using pivot tables and pivot charts in Microsoft Excel. It includes details about course materials, the course outline covering topics like structuring data and calculating values, expectations for the course, and an introductory section on why pivot tables are useful. The course aims to teach students how to organize, filter, summarize and analyze data using pivot tables and pivot charts.

Uploaded by

alexanderhfuadf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

MICROSOFT EXCEL:

PIVOT TABLES &


PIVOT CHARTS
With Best-Selling Excel instructor Chris Dutton

*Copyright Maven Analytics, LLC.


COURSE MATERIALS

50+ Downloadable PPT Slides to serve as a helpful reference guide when


you’re offline or on the go

Interactive, hands-on demos to keep you engaged, with downloadable


workbooks that you can use to explore and learn at your own pace

Course Quizzes, Knowledge Checks, and Homework Exercises to


reinforce key concepts along the way

Case Studies to test your skills by applying the tools you’ve learned to a
variety of interesting, real-world contexts
COURSE OUTLINE

1 PivotTable 101
• Structuring source data, navigating the Field List, creating & manipulating tables, etc.

2 PivotTable Formatting
• Conditionally formatting values, applying default & custom styles, adjusting table layouts, etc.

3 Sorting, Filtering & Grouping


• Sorting data, applying label & value filters, adding wildcards, grouping values, etc.

4 Calculated Fields & Values


• Creating calculated fields & items, summarizing values, applying custom calculations, etc.

5 PivotCharts
• Building PivotCharts, adding slicers & timelines, creating dynamic dashboards etc.

6 Case Studies
• Burrito ratings, shark attacks, San Francisco salaries, wine tasting records, etc.
SETTING EXPECTATIONS

1 I’ll be using Excel 2016 for the demos & exercises


• What you see on your screen may not always match what I’m showing on mine, and some features
may be unavailable in earlier versions of Excel

2 This course is designed with PC users in mind


• Mac users can apply all of the same key concepts, but the user experience may be considerably
different across platforms

3 It’s not always about “right” vs. “wrong”


• Analytics is an art, and there are often a number of solutions to the same problem. My goal is to
give you the tools and techniques that you need to explore your own analyses

4 Feeling stuck? We’ve got your back.


• If you have questions about the course material, feel free to post a question and we’ll be happy to help
• For project-specific questions, recommend posting to the answers.microsoft.com community forum
PIVOT TABLE 101
WHY PIVOT TABLES?

Looking at a raw data set like the one here,


how would you answer the following?

1. Which state had the highest population in 2002?

2. In which year was overall US population the highest?

3. Which states saw a decline in student population rate


between 2003 and 2004?

What if you don’t even know what


you’re looking for?
PIVOT TABLE 101

PivotTables allow you to easily organize, filter,


summarize, and analyze raw data

“Analyzing data without a Pivot is like hammering a nail with a


noodle” -Albert Einstein*

*Quote not confirmed


KEY BENEFITS

1 POWERFUL
- Uncover insights and answer key questions about your data

2 BEAUTIFUL
- Apply custom styles and conditional formatting rules to bring your Pivots to life

3 FAST
- Create custom views, filters, and calculated fields on the fly

4 ACCURATE
- Automate calculations to minimize human error

5 FLEXIBLE
- Manipulate table layouts and create dynamic views in seconds
DATA STRUCTURE

GOOD! BAD!

• Rectangular (variables as columns, observations as rows) • Transposed (variables as rows, observations as columns)
• No extra formatting • Unnecessary formatting
• Contains only dimensions & measures • Contains calculated fields
• Clear column headers • Confusing column header names
• No extra headers, footers, sub-totals or calculated fields • Extra header rows
INSERTING A PIVOT TABLE

From the “Insert” menu, select PivotTable to create a blank


Pivot, or use the Recommended PivotTables option to
browse pre-populated starting points

What data are


you analyzing?

Where will the


PivotTable live?

(Insert → PivotTable) (Insert → Recommended PivotTables)


THE FIELD LIST

Layout options allow you to adjust


the look and feel of the field list
The Field List shows all the
variables in your dataset, and
which ones are currently
included in the Pivot

Variables included in the Columns


If there are fields that you want field appear as individual columns
to use to filter the whole data within the Pivot
set, drag them to the Filters
box
Numerical variables are almost always
included in the Values field
Variables included in the Rows
field will appear as individual (These are the quantitative measures that
rows within the Pivot you care about: sales, revenue, clicks, etc.)
ANALYZE & DESIGN OPTIONS

The “Analyze” Tab:

The “Design” Tab:


SELECTING, CLEARING & MOVING PIVOTS

Clear options allow you to


clear all fields and values from
a table, or just any filters that
have been applied Select options (allow you to select Move options allow you to
entire sections of the PivotTable relocate an existing PivotTable to
(or the entire table itself) a new worksheet or a new
location within the existing one
PRO TIP:
Select → Entire PivotTable, then copy
and paste to duplicate an entire Pivot
REFRESHING & UPDATING PIVOTS

Refresh updates the PivotTable based


on changes made within the defined
source data range or table

PRO TIP:
Format your source data as a table to dynamically Change Data Source allows you
adjust as new columns or rows are added, or use
a column-only range reference (i.e. $A:$G)
refresh the Pivot to reflect changes
outside of the defined source range
or table (i.e. new columns or rows)
HOW DO PIVOTS ACTUALLY WORK?

STEP 1: Detect/evaluate coordinates


• State = Arizona
• Measure = Total Population
• Filter = All ages

Excel isolates relevant source data

STEP 2: Apply arithmetic


• Summarize Values By: AVERAGE
• (vs. SUM, COUNT, MAX, MIN, etc.)
NOTE: You can double-click any
specific value in a Pivot to
STEP 3: Display result generate a new tab showing the
exact source data used to
• (586+859+870+1656+892)/5 = 973 calculate it
PIVOT FORMATTING
NUMBER FORMATTING

Right-click a column header or any individual value within


a field to change the number format (number, currency,
percentage, date, etc.)

PRO TIP:
Right click, select PivotTable Options, and select
the “Layout & Format” tab to customize how you
want to display blank or error values
TABLE STYLES

Select from a range of styles


(right-click to make default), or
customize your own:
TABLE LAYOUTS: COMPACT VS. OUTLINE

Compact Form (default): Outline Form (recommended):

VS
.

• Nested fields/dimensions condensed • Each field/dimension broken out into its own column,
into one column, with one filter option with separate column headers and filter options
• Allows you to apply custom filters to each field (i.e.
label filters on the Product Category field and value
filters on the Product Sub-Category field)
TABLE LAYOUTS: TABULAR FORM

Tabular Form (non-repeating): Tabular Form (repeating):

PRO TIP:
Use Outline Form when you are manipulating data
within a Pivot, and switch to Tabular form with
repeating labels (and no grand totals or subtotals) if you
want to create a new raw dataset
CONDITIONAL FORMATTING

Conditional Formatting rules


can be applied to PivotTables
just like normal data ranges
(Home → Conditional Formatting)

Options include:
• Text and Value-based
Formats
• Data Bars
• Color Scales
• Icon Sets
• Formula-Based Rules
SORTING, FILTERING & GROUPING
SORTING & FILTERING

Hit this button (or right-click one of the values)


to drill into Sorting & Filtering options

More Sort Options: Label Filters: Value Filters:

Manual
Selections
GROUPING DATA

Select values that you’d like to group Right-click and A new field is created (“Job Title2”)
(in this case fire-related job titles) select Group containing the new group (“Group1”)
Note: Both names can be customized
SLICERS & TIMELINES

Insert Slicers or Timelines

PRO TIP:
Slicers and Timelines work just
like regular report filters, but
with user-friendly interfaces

A filter designed
specifically for dates

Basically a prettier
version of a filter!
REPORT FILTER PAGES

(PivotTable Tools → Analyze)

Use the “Show Report Filter Pages”


option to create new tabs for each value
that a given filter (i.e. Year) can take

Year = 2011 Year = 2012 Year = 2013


CALCULATED VALUES & FIELDS
SUMMARIZE VALUES BY

Summarize Values By determines how


numbers should be treated when they are rolled
up or aggregated (sum, count, average, max, etc.)

PRO TIP:
Excel will default to “Count Of” if a data
column contains blanks or non-numerical
values. Typically you will want to change
this field setting to “Sum Of”
SHOW VALUES AS

Show Values As options allow you


to apply additional calculations to
change the way values are shown,
such as the Percent of a Total or
Subtotal, Running Value, Rank, etc.

In this case, we’re showing Order


Quantity values as % of Column Total,
rather than whole numbers
SHOW VALUES AS - EXAMPLES

In this example we’re summarizing the same Revenue field 6 different ways:

Value % of Total % of Parent % Difference Running Total Rank


(no calculation) Column (genre) (prev. year) (by year) (Large →
Small)
SHOW VALUES AS - INDEX

The Index calculation uses an aggregated weighted average to reveal the impact of one number
within the context of a data set

Documentaries index very high in France, meaning that a global


increase in Documentary ticket prices would impact the French
film industry significantly more than any other country

Each Revenue number is converted to an Index representing it’s


importance within each column, using the following formula:

(Cell Value * Grand Total) / (Row Total * Column Total)


CALCULATED FIELDS

Calculated Fields allow you to create new measures based on existing, numerical fields:

In this case I’ve added a measure called % Students,


equal to Student Population / Total Population

PRO TIP:
Don’t calculate rate metrics (i.e. CTR, CPC) in your raw data, use calculated fields in your
Pivot. This ensures that they calculate properly no matter how your data is rolled up
CALCULATING USING COUNTS

Calculated fields are always based on the SUM of other fields (even if they are shown as a count,
max, average, etc.). But what if you want to make a calculation based on the COUNT of a field?

Ex) Create a field to calculate the


Likes per Post on each date STEP 1: Create a new “Count” STEP 2: Create a calculated
column (=1) in the source data field defined as Likes/Count
CALCULATED ITEMS

Calculated Items allow you to create new dimensions or categories based on existing dimensions:

In this case I’ve added a new category called “Kids”,


which combines G and PG movie ratings

PRO TIP:
DON’T USE CALCULATED ITEMS UNLESS YOU NEED TO; you’re usually better off simply
grouping fields or adding new category columns within your source data itself
SOLVE ORDER

If you’ve defined multiple calculated items, the Solve Order can be used to determine which
calculations to prioritize (value is determined by the last formula in the list)
LIST FORMULAS

The List Formulas tool produces a new tab summarizing all calculated fields and items
associated with a given Pivot, along with the current solve order
PIVOT CHARTS
PIVOT CHART 101

A PivotChart is simply a chart that is tied to a specific PivotTable; as you adjust filters and
fields in your Pivot, the PivotChart updates dynamically

1) Select your pivot and choose PivotChart from


either the “Insert” tab or the “Analyze” tab

2) Select a chart type 3) The PivotChart will be inserted, and dynamically tied to the pivot
(note: you can filter the view using either the pivot table or the chart itself)
PIVOT CHART OPTIONS

The “Analyze” Tab:

The “Design” Tab:

The “Format” Tab:


PIVOT CHART LAYOUTS & STYLES

Chart Layouts & Styles


allow you to adjust the look
and feel of a PivotChart,
including adding elements,
changing color palettes, or
applying pre-set templates
PIVOT CHART FIELD BUTTONS

Select PivotChart Tools → Analyze → Field


Buttons to hide them from the chart (or
right click one of them from the chart itself)

Field Buttons allow you to apply or PRO TIP:


adjust filters directly within the chart You can format PivotCharts exactly like normal
Excel charts – the only difference is that
PivotCharts are dynamically tied to a
PivotTable
ADDING SLICERS

A Slicer is basically a “prettier” version of a PivotTable filter; it works exactly the same way
by filtering the data you see in your PivotTable and PivotCharts

1) Select a PivotTable and choose “Insert


Slicer” from the “PivotTable Tools” tab

2) Select the field(s) 3) The Slicer will be inserted next to your table, allowing you to
that you want to filter filter on specific values (or combinations, using the CTRL key)
ADDING TIMELINES

A Timeline works just like a Slicer – it’s just formatted to work specifically with Date & Time fields

1) Select your pivot table and choose “Insert


Timeline” from the “PivotTable Tools” tab

2) Select the date/time 3) The Timeline is inserted, allowing you to filter on specific time
field(s) that you want to filter frames (Note: may need to adjust unit of time (month, year, etc.))
CASE STUDIES
SETTING EXPECTATIONS

1 The goal of these case studies is to demonstrate how the concepts


covered in this course can be applied to a range of different data sets
• These are not intended to be comprehensive analyses, but simply starting points to
help you practice using these tools in new and different contexts

2 Some data may have been altered or fabricated to facilitate the


demonstrations
• Most of the data is 100% real, but keep in mind that some modifications have been made
specifically for the purposes of this course

3 Homework exercises will be provided after each case study


• Exercises will follow each case study introduction, and build upon the specific concepts
covered. Answers will be provided where possible; for additional support please reach out!
CASE STUDY: IMDB MOVIE DATABASE

DATASET SUMMARY:
• Movie titles, attributes, budgets and revenues from
the Internet Movie Database (IMDb), 1920-2015

DIMENSIONS & MEASURES:


• Dimensions: Title, Release Date, Color/B&W, Genre,
Language, Country, Rating, Lead Actor, Director
Name
• Measures: Lead Actor FB Likes, Cast FB Likes, Director
FB Likes, Movie FB Likes, IMDb Score, Total Reviews,
Duration (min), Gross Revenue, Budget

CONCEPTS COVERED:
• Number Formatting & Conditional Formats
• Sorting, Filtering & Grouping n=3,725
• Calculated Values & Fields
• PivotCharts
CASE STUDY: U.S. VOTERS (2012)

DATASET SUMMARY:
• 2012 population and voter registration data from
the U.S. Census Bureau, by state and age group

DIMENSIONS & MEASURES:


• Dimensions: State, Age
• Measures: Total Population, Citizen Population,
Registered Voters, Confirmed Voters

CONCEPTS COVERED:
• Calculated Fields
• Value Settings (% of Column, % of Parent)
n=255
CASE STUDY: SAN FRANCISCO SALARIES

DATASET SUMMARY:
• Salary information from San Francisco
government employees, 2011-2013

DIMENSIONS & MEASURES:


• Dimensions: Employee Name, Year, Employee
ID, Job Title
• Measures: Base Pay, Overtime Pay, Other Pay

CONCEPTS COVERED:
• Sorting & Filtering
• Grouping n=24,285

• Calculated Fields
• Table Layouts
CASE STUDY: SHARK ATTACK RECORDS

DATASET SUMMARY:
• Shark attack records from 1900-2016

DIMENSIONS & MEASURES:


• Dimensions: Case Number, Date, Type,
Country, Area, Location, Activity, Name,
Gender, Age, Injury, Fatal (Y/N), Species,
Investigator or Source
• Measures: None

CONCEPTS COVERED:
• Date Grouping
• Value Settings (% of Column, Running Total)
• PivotCharts
n=5,292
CASE STUDY: STOCK MARKET DATA

DATASET SUMMARY:
• 3-month sample of stock market data for 500
publically-traded companies

DIMENSIONS & MEASURES:


• Dimensions: Date, Symbol
• Measures: Open, High, Low, Close, Volume

CONCEPTS COVERED:
• Sorting & Filtering
• Conditional Formatting (Highlight Cells, Data Bars)
• Value Settings (% Difference From)
n=29,440
CASE STUDY: BASEBALL TEAM STATS

DATASET SUMMARY:
• Major League Baseball team statistics
by season, 1995-2015

DIMENSIONS & MEASURES:


• Dimensions: Season Start, Year, League,
Team (Short), Team (Full), Division, DivWin,
WCWin, LgWin, WSWin
• Measures: G, W, L, RS, AB, H, 2B, 3B, HR,
BB, SO, SB, CS, RA, ER, ERA, CG, SHO, SV

CONCEPTS COVERED:
• Sorting & Filtering
• PivotCharts & Slicers
• Calculated Fields n=624
CASE STUDY: SAN DIEGO BURRITO RATINGS

DATASET SUMMARY:
• Burrito ratings and Yelp reviews from 65
San Diego restaurants in 2016

DIMENSIONS & MEASURES:


• Dimensions: Location, Burrito, Date,
Recommendation, Reviewer, Notes
• Measures: Yelp Rating, Cost, Tortilla (0-5),
Temp (0-5), Fillings (0-5), Meat Volume (0-5),
Uniformity (0-5), Salsa (0-5), Synergy (0-5),
Wrap Quality (0-5)

CONCEPTS COVERED:
• Calculating with COUNT
• Summarize Values By (SUM, AVERAGE)
• Show Values As (Rank) n=237
• Conditional Formatting
CASE STUDY: DAILY WEATHER CONDITIONS

DATASET SUMMARY:
• Daily weather conditions in Boston,
Massachusetts from Jan-Dec 2016

DIMENSIONS & MEASURES:


• Dimensions: Date, Conditions
• Measures: Max Temp (F), Mean Temp (F),
Min Temp (F), Max Wind Speed (MPH),
Precipitation (in)

CONCEPTS COVERED:
• Sorting & Filtering
• PivotCharts n=363
• Date Grouping
• Calculating with COUNT
CASE STUDY: SPARTAN RACE FACEBOOK POSTS

DATASET SUMMARY:
• Spartan Race Facebook posts from
Aug-Oct 2016

DIMENSIONS & MEASURES:


• Dimensions: Page, Date of Post, Post
Copy, Link, Post Type, Hour of Post, Time
of Day
• Measures: Shares, Reactions, Likes,
Comments

CONCEPTS COVERED:
• Show Values As (% of Column)
• Calculated Fields
• Calculating with COUNT n=393
CASE STUDY: APPLE APP DATA

DATASET SUMMARY:
• Details and descriptions for 7,000+ mobile
apps available on the Apple App Store

DIMENSIONS & MEASURES:


• Dimensions: App ID, App Name, Size, Currency, Price,
Age Rating, Primary Genre
• Measures: Total Ratings, Total Avg Rating, Current
Version Ratings, Current Avg Rating, Supported
Devices, # of Screenshots, Supported Languages

CONCEPTS COVERED:
• Sorting & Filtering
• Calculated Fields
• Show Values As (% of Column, % of Parent) n=7,197
• Conditional Formatting
CASE STUDY: WINE TASTING SCORES

DATASET SUMMARY:
• Data from 130,000 wine tastings, including
locations, wine descriptions, points and price

DIMENSIONS & MEASURES:


• Dimensions: Country, Province, Region,
Subregion, Winery, Variety, Wine Name,
Taster Name, Taster Twitter Handle,
Description
• Measures: Points, Price

CONCEPTS COVERED:
• Sorting & Filtering
• Value Grouping n=129,971
• PivotCharts

You might also like