Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

50
Pivot Tables and Beyond Patrick Carey

description

Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference Presenter: Patrick Carey, Cengage Learning Author Excel is sometimes called the most popular "database" in the world, not because it's a database but because it makes data so accessible that users often turn to spreadsheets for data entry. Yet for all that, Excel's tools for data analysis and modeling remain largely untapped by the average user. In this, pivot tables may be the most powerful and least utilized tool for data exploration. In this presentation we'll examine some of the new enhancements to pivot tables introduced in Excel 2013. We'll examine how to set up relationships using the Excel Data Model to summarize information across multiple data tables. And then we'll go beyond, exploring the data modeling and data visualizing tools provided by the PowerPivot and Power View add-ins, interpreting data not just numerically but through visual imagery, charts, and interactive maps.

Transcript of Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Page 1: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Pivot Tables and BeyondPatrick Carey

Page 2: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Daily Sales from GJCTransactions from Green Jersey Cycles from 2010 through 2013.

Page 3: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Products TableTable displaying a selection of sample products sold by GJC

Page 4: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Stores TableTable displaying information about 20 brick & mortar stores and the GJC website

Page 5: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Count of Product ID’sThe COUNT function of Product ID’s gives an erroneous result since the same Product ID multiple times. We can correct this issue using the DISTINCOUNT function available under the Excel Data Model

Page 6: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Using Distinct CountCount of Products ID’s Discrete Count of Product ID’s

Page 7: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

THE EXCEL DATA MODEL

Pivot Tables and Beyond

Page 8: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

The Excel Data ModelThe Excel Data Model is attached to the workbook file, providing database tools and more compact and efficient data storage

Data Modeldatabase

Page 9: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Data Model OverviewBenefits• Ability to Define Relationships

between Multiple Tables• Data Compression• Support for DAX • Interfaces with Dashboarding

Tools like Power View

Limitations• Built-in Tools Missing from Pivot

Table Menus• Inability to Group Fields• Supported only in Excel 2013

Page 10: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Adding an Excel Table to the Data ModelYou can add a table to the Data Model when you generate the Pivot Table, by clicking the Add this to the Data Model checkbox

Page 11: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Distinct Count of Product ID’sThe DISTINCOUNT function available under the Excel Data Model counts each unique occurrence of a Product ID in the Sales table; from this we know that 212,720 units were sold from 35 different GJC products over the past 4 years.

Page 12: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Adding a Second TableTo use information from a second table, it has to be added to the Data Model and a relation established between the two tables.

Page 13: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Creating a Table Relationship

Page 14: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

VIEWING THE DATA MODEL WITH POWERPIVOT

Pivot Tables and Beyond

Page 15: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

PowerPivot Features

• View, edit, sort and filter data in the PowerPivot grid

• Perform Calculations using DAX• Set up table relations with a

graphic interface• Set default display formats for

data columns

• Hide Columns and Tables• Create hierarchies of data

columns• Define Key Performance

Indicators (KPI’s)• Analyze Big Data containing

Millions of Records

Page 16: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

PowerPivot Data View

Page 17: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Importing Database Tables into the Data ModelMultiple database tables can be imported into the Data Model. Power Pivot will retain any table relations already defined in the database.

Page 18: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Table Relationships within Diagram ViewDiagram is useful for viewing the complete structure of your data model, including all relationships, hierarchies, and KPI’s. Here Sales Date in the Sales table and Date in the Calendar table are linked

Page 19: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Setting Column Sort OrderSorting Months by Month Number Sorting Weekdays by Weekday Number

Page 20: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Units Sold by Year and MonthIt’s important to define the sort order for the Year and Month fields so they are sorted in the correct order.

Page 21: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

PIVOT TABLE CALCULATIONS USING DAX

Pivot Tables and Beyond

Page 22: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

DAX• Data Analysis Expressions• Calculations based on

Tables and Columns• Support for Lookup Tables

and Table Relations

• Optimized Memory Engine supports Rapid Calculations over Large Columns and Tables

Page 23: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

PowerPivot CalculationsCalculated Columns• Calculation context is row-based• Formulas are applied to an

entire column• Appear as a new columns within

PowerPivot Data View

Calculated Fields• Calculation is based on the

PivotTable context• Called measures in PowerPivot

2010• Appear in the Calculation Area

in PowerPivot Data View

Page 24: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculating Revenue from Each SaleTo calculate the revenue from each sales use the Unit Price field round in the Products table using the RELATED function to access the field valueRevenue:= [Units Sold]*RELATED([Products[Unit Price])

Page 25: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Total Revenue by Month and YearCalculated Columns appear in the list of table columns alongside data fields and can be directly used in any Pivot Table combination we wish.

Page 26: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculating the Total Store DaysGJC is not open every day, so we create the StoreDays calculated field to count up the number days minus the number of holiday dates from the Holidays table.Store Days := COUNT([Calendar[Date]) – COUNT(Holidays[Date])

Page 27: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculating Average Daily RevenueThe average revenue collected day can be inserted as a calculated field using the DAX expression:Daily Revenue := SUM([Revenue])/[Store Days]

Page 28: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Daily Revenue from the GJC StoresOverall the store earns an average of about $7,600 per day for the selected products. Individual stores earn anywhere from $58 up to more than $440 per day.

Page 29: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

KEY PERFORMANCE INDICATORS

Pivot Tables and Beyond

Page 30: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Defining a KPI against an Absolute StandardKPI’s provide a visual indicator of how a base field performs versus a defined standard. Here we set an absolute value for Daily Revenue with “normal” or ”acceptable” ranging from $80/day to $160/day

Page 31: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Viewing a Key Performance IndicatorHigh performance values are indicated by a green ball, low performance by a red ball, and values within the target area are highlighted with the yellow ball.

Page 32: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

KPI’s can Lose their Meaning when the Data is FilteredAn absolute standard loses its meaning when the data values filtered. In this almost all stores appear to be underperforming when measured against an absolute standard that should apply only when all product categories are included.

Page 33: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculate the Number of Brick & Mortar storesWe want to compare each Brick & Mortar store to the average daily revenue from the Brick & Mortar stores. We can do this by using a calculated field that calculates the average revenue per store. We start by creating an expression to count the number of Brick & Mortar stores

Page 34: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculate the Daily Revenue from Brick & Mortar storesNext we calculate the Daily revenue from Brick & Mortar stores only. Note that here and in the Brick Count field we use the ALL() function to ensure that we always count over all [City State], [City], and [StoreID] fields regardless of the Pivot Table layout.

Page 35: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculating Average Revenue per Brick StoreThe Average Daily Revenue from the Brick Stores is calculated using the expression:Brick Revenue Average := [Brick Revenue]/[Brick Count]

Page 36: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Creating a KPI using a Calculated FieldWe now revise the Daily Revenue KPI so that it uses the Brick Revenue Average calculated field. Low values are cut off at 40% of the target, medium values at cut off at 80% of the target value.

Page 37: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Comparing Stores Under Different FiltersAll Brick & Mortar Stores Brick & Mortar Stores by Market

Page 38: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Calculating the Maximum Daily RevenueDAX supports a wide variety of queries and calculations. For example the above expression uses the SUMMARIZE function to return the maximum revenue generated on any particular day.

Page 39: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Viewing Maximum RevenueThe greatest one-day intake for the company was about $22,000 from all sources. The greatest one-day result for the website was a little more than $10,000; from the combined 20 Brick & Mortar stores the greatest one-day take was more than $14,000.

Page 40: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

MANAGING YOUR FIELDS AND TABLES

Pivot Tables and Beyond

Page 41: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Defining a HierarchyHierachies are used to group fields that have an inherit ordering. For example the location hierarchy orders stores from Region State City

Page 42: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Viewing a Hierarchy

Hierarchies can be added to a Pivot Table, appearing as nested field. To drill down into the hierarchy, click the [+] box.

Page 43: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Hiding ColumnsYou can clean up the clutter of unwanted fields by hiding them from the user; showing only those fields which are directly involved in the data analysis. You can also hide entire tables, such as the Holidays table, that contain only lookup values.

Page 44: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Creating PerspectivesYou can reduce clutter in the Power Pivot view of the Data Model by creating a perspectives, specifying which tables and fields are visible to the Power Pivot user. However, modifying the perspective does not affect the table/field list in Excel.

Page 45: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

ANALYZING YOUR DATA WITH POWER VIEW

Pivot Tables and Beyond

Page 46: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Sales ReportThis Power View report tracks sales for different products category by region with each report element dynamically linked to the others.

Page 47: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Clothing Sales ReportGJC has been selling an increasing percentage of cycling clothing for women over the past four years as this Power View report demonstrates.

Page 48: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Brick & Mortar Stores ReportThis Power View report examines the Brick & Mortar stores, providing contact information, map location, and the daily revenue.

Page 49: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Customer ReportThis Power View report shows the location of Green Jersey Cycling customers and the products they bought.

Page 50: Pivot Tables and Beyond Data Analysis in Excel 2013 - Course Technology Computing Conference

Contact Information

Patrick CareyCarey Associates8502 Miller RoadVerona, WI 53593(608) 832 – [email protected]