NCAIR 2015 ExcelPowerTools
NCAIR 2015 ExcelPowerTools
2
Why Pivot Tables
3
Limitations of Pivot Tables
4
Displaying Data –
Pivot Tables
5
Connecting to Data
6
Connecting to Data
7
Displaying Data – Pivot Tables
8
Displaying Data – Pivot Tables
9
Displaying Data – Pivot Tables
Sum
Count
Average
Max
Min
Product
Count Numbers
StdDev
StdDevp
Var
Varp
10
Displaying Data – Pivot Tables
11
Displaying Data –
Power Pivot
12
Displaying Data – Power Pivot
• Set-up
13
Displaying Data – Power Pivot
• The Power Pivot environment
14
Displaying Data – Power Pivot
• The Power Pivot environment
15
Displaying Data – Power Pivot
• Import data
16
Displaying Data – Power Pivot
• How the imported data look
17
Displaying Data – Power Pivot
• Bringing data into Excel
18
Displaying Data – Power Pivot
• PivotTable vs. Power Pivot PivotTable
19
Displaying Data – Power Pivot
• DAX
– Data Analysis Expressions (DAX)
– Formula language for Power Pivot
– Used to create Calculated Columns and Calculated
Fields
20
Displaying Data – Power Pivot
• Calculated Columns
– Used to add an additional column to data table
– Can be a column added from a related table (like a
VLOOKUP) or new data, derived from existing data
(sum to combined SAT, length of name, substring of
longer string, etc.)
– Column can be used in any area of the pivot
21
Displaying Data – Power Pivot
• Adding a calculated column
22
Displaying Data – Power Pivot
• Adding a calculated column
23
Displaying Data – Power Pivot
• Adding a calculated column
24
Displaying Data – Power Pivot
• Adding a calculated column to pivot table
25
Evaluation Contexts
• Row context
• Filter context
26
Evaluation Contexts
• Row context
• The one row being evaluated
• Automatic for calculated columns
• Can be created in other ways as well (SUMX, AVERAGEX, etc.)
• Filter context
27
Row Context
28
Evaluation Contexts
• Row context
• The one row being evaluated
• Automatic for calculated columns
• Can be created in other ways as well (SUMX, AVERAGEX, etc.)
• Filter context
• The filters being applied by the pivot table
• Filters can be explicit or implicit
• Can add additional filters only with CALCULATE
29
Filter Context
30
Displaying Data – Power Pivot
• Calculated Fields
– Used to add a calculated element
– Aggregate function that applies to whole table,
column, or range
– Something that needs to be recalculated
– Fields can only be used in the VALUES section
31
Displaying Data – Power Pivot
• Adding a Calculated Field
32
Displaying Data – Power Pivot
• Adding a Calculated Field
33
Displaying Data – Power Pivot
• Calculated Field in Power Pivot
34
Displaying Data –
Power Pivot
DAX
ALL, ALLEXCEPT, CALCULATE, DISTINCTCOUNT, DIVIDE, FILTER
35
Displaying Data – Power Pivot
• DISTINCTCOUNT
DISTINCTCOUNT( <column> )
36
Displaying Data – Power Pivot
• Adding a Calculated Field
37
Displaying Data – Power Pivot: DAX CALCULATE
• CALCULATE
CALCULATE(
[Distinct Students],
WorkshopData[Class level]=“Freshman”,
39
Displaying Data – Power Pivot: DAX CALCULATE
40
Displaying Data – Power Pivot: DAX ALL
• ALL
41
Displaying Data – Power Pivot: DAX ALL
CALCULATE(
42
Displaying Data – Power Pivot: DAX ALL
43
Displaying Data – Power Pivot: DAX ALL
44
Displaying Data – Power Pivot
• DIVIDE
– “Safe” divide
– Can specify alternate result for divide by zero
45
Displaying Data – Power Pivot
46
Displaying Data – Power Pivot: DAX FILTER
• FILTER
47
Displaying Data – Power Pivot: DAX CALCULATE
Above Average GPA Enrolled Undergraduates:=
CALCULATE(
FILTER(
WorkshopData,
48
Displaying Data – Power Pivot: DAX FILTER
49
Displaying Data – Power Pivot: DAX FILTER
• ALLEXCEPT
50
Power Query
51
Power Query
• Retrieve data from a variety of external sources
• Pull in external data from the Internet
• Limit the data you bring into your model (filter
on rows and columns)
• Keep you model to a reasonable size (< 1M records)
to prevent processing problems
• Bring in only what you need
52
Power Query
• Consolidate multiple
tables into one
53
Power Query – Advanced
• Consolidate multiple
tables into one
• In-line data
transformations
54
Power Query – Advanced
• Consolidate multiple
tables into one
• In-line data
transformations
• All transformation steps
are listed, and reversible
55
Power Query – Advanced
• Consolidate multiple
tables into one
• In-line data
transformations
• All transformation steps
are listed, and reversible
• Access to sources of
data not readily
available to Power Pivot
56
Power Query – Advanced
• SharePoint Lists
57
Power Query – Advanced
• See all available
lists
• Expand a
particular list for
fields
58
Power Query – Advanced
• Even get Active Directory names
59
Power Query – Advanced
• Connect to online faculty database
– Import active users from Digital Measures
– Merge with local data
– Export updated data to Digital Measures
60
Power Query – Advanced
61
Power Query – Advanced
• Microsoft SQL Server and Access
62
Power Query – Advanced
63
Power Query – Advanced
64
Power Query – Advanced
65
Displaying Data –
Power View
66
Displaying Data – Power View
• Power View
– Dashboard builder
– Allows synchronized filtering
– Bring together tables, graphs, maps
67
Displaying Data – Power View
68
Displaying Data – Power View
69
Displaying Data – Power View
70
Displaying Data – Power View
71
Displaying Data – Power View
72
Displaying Data – Power View
73
Displaying Data – Power View
74
Displaying Data – Power View
75
Displaying Data – Power View
76
Displaying Data –
Power Map
77
Displaying Data – Power Map
• Power Map
– Automated way to map geographic data
– Doesn’t require geo-location information like
longitude and latitude (just country, state, or county
names)
– Can add elements to look at aggregate function on
variables across physical space
78
Displaying Data – Power Map
79
Displaying Data – Power Map
80
Displaying Data – Power Map
81
Displaying Data – Power Map
82
Displaying Data – Power Map
83
Displaying Data – Power Map
84
Displaying Data – Power Map
85
Displaying Data – Power Map
86
Resources
• Rob Collie (http://powerpivotpro)
– DAX Formulas for PowerPivot, 2013
87
Contact Information
David Onder, Director of Assessment
[email protected]
With the help of Tim Metz, Elizabeth Snyder, Billy Hutchings, and Henson Sturgill
88