Excel PivotTables PivotCharts
Excel PivotTables PivotCharts
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.
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 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
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?
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
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
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
Options include:
• Text and Value-based
Formats
• Data Bars
• Color Scales
• Icon Sets
• Formula-Based Rules
SORTING, FILTERING & GROUPING
SORTING & FILTERING
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
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
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
In this example we’re summarizing the same Revenue field 6 different ways:
The Index calculation uses an aggregated weighted average to reveal the impact of one number
within the context of a data set
Calculated Fields allow you to create new measures based on existing, numerical fields:
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?
Calculated Items allow you to create new dimensions or categories based on existing dimensions:
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
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
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
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
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
DATASET SUMMARY:
• Movie titles, attributes, budgets and revenues from
the Internet Movie Database (IMDb), 1920-2015
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
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
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
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
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
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
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
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
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
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
CONCEPTS COVERED:
• Sorting & Filtering
• Value Grouping n=129,971
• PivotCharts