Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Pivot Tables

… help in Analyzing Large


Amounts of Data

1 of 15
Grouping Data
According to the unique values in one or more fields
• Automatically groups large amounts of data into smaller,
more manageable categories
– suppose you have a data source with a Region field where each cell
contains one of four values: East, West, North, and South.
– The original data may contain thousands of records, but if you build
your PivotTable using the Region field, the resulting table has just
four rows - one each for the four unique Region values in your data

You can also create your own grouping after you have
built your PivotTable
• if your data has a Country field, you can build the PivotTable
to group together all the records that have the same
Country value
• When you have done that, you can further group the unique
Country values into continents: North America, South
America, Europe, and so on

Summarizing
Along with grouping, Excel also displays
summary calculations for each group
• Default calculation is Sum, ie., for each group,
Excel totals all the values in some specified field
– if your data has a Region field and a Sales field, a
PivotTable can group the unique Region values and, for
each one, display the total of the Sales values.
– Other summary calculations include
» Count, Average, Maximum, Minimum, and Standard Deviation

Even more powerful,


• a PivotTable can display summaries for one
grouping broken down by another.
– suppose your sales data also has a Product field.
» You can set up a PivotTable to show the total Sales for each
Product, broken down by Region

2 of 15
Filtering
Enables you to view just a subset of the data
• by default the PivotTable’s groupings show all the
unique values in the field
– However, you can manipulate each grouping to hide
those that you do not want to view

Each PivotTable also comes with a Report


area, that enables you to apply a filter to the
entire PivotTable.
• suppose your sales data also includes a Customer
field
• By placing this field in the PivotTable’s Report area,
you can filter the PivotTable report to show just the
results for a single Customer

PivotTable and PivotChart Reports


PivotTable report PivotChart report
used to used to
• summarize, • visualize that
analyze,
summary data in a
• explore, and
present summary PivotTable report, &
data • easily see
comparisons,
patterns, and trends
Both enable us
• to make informed decisions about critical
data in an enterprise
3 of 15
Data suitable for use in a Pivot Table
must have these characteristics:

Data suitable for use in a Pivot Table


must have these characteristics:
1. The top row of data contains column headers
2. Each row of data is a record about a particular
entity or transaction
3. Each column of data holds the same kind of
information
4. There are no entirely blank rows in the data
5. There are no entirely blank columns in the data
6. If a column contains numbers, use a zero instead
of a blank cell when you don’t have a value
7. At least one of the fields contains groupable data,
i.e.,the field contains data with a limited number of
distinct text, numeric, or date values
4 of 15
Analysis provides insight into the
patterns of transaction
• How much is the Company X spending?
• Who is spending it and with whom?
• What goods and services is the company X
buying?
Information needed to analyze spending data
can come from several sources
• Purchase Orders
• Invoices
• Requisitions
• Master Agreements

Analysis Reporting Concepts


Fact
• basic transaction data you are investigating

Data field
• numerical data value that can be measured

Dimensions
• details about the fact
Fact: Purchase Order
Data field: PO Spend (INR or USD)
Dimensions:
Ordered Date
Supplier
Agency Name
5 of 15
Analysis Reporting Concepts
Dimensions can be further divided into levels
• Hierarchies impose a structure on the levels of data within a
dimension

Dimension: Ordered Date


Hierarchy 1: Calendar
Level 1: Calendar Year (2006, 2007…)
Level 2: Calendar Quarter (Q1, Q2…)
Level 3: Month
Level 4: Day
Hierarchy 2: Fiscal
Level 1: Fiscal Year (2006, 2007…)
Level 2: Fiscal Quarter (Q1, Q2…)
Level 3: Month
Level 4: Day

Over to first two


examples…

6 of 15
Example-1:
Given the data,
• Which region sold the
most?
• Which product is the
bestseller?
• Are sales going up or
down over time?

Which region sold the most?

Which product is the bestseller?

Are sales going up or down over time?

7 of 15
Example-2: Sporting Goods
SportingGoodsRawData.xlsx
What are the sales for the Camping
category for each region?
In each store, which days of the week see
the most customers?
In each store, which category has the
highest sales?
Which day of the week has the lowest
total sales?

Example-3: Banking
This table comprises a month's worth of new account information for
a three-branch bank. The table contains 712 rows, and each row
represents a new account. The table has the following columns:
• The date when the account was opened
• The opening amount
• The account type:
– CD, checking, savings, or IRA (Individual Retirement Account)
• Who opened the account:
– a teller or a new-account representative
• The branch at which it was opened:
– Central, Westside, or North County
• The type of customer:
– An existing customer or a new customer

8 of 15
Example-3: Banking bank accounts.xlsx
What is the daily total new deposit amount for
each branch?
How many accounts were opened at each
branch, broken down by account type?
What's the dollar distribution of the different
account types?
What types of accounts do tellers open most
often?
How does the Central branch compare to the
other two branches?
In which branch do tellers open the most
checking accounts for new customers?
Example-4: Grocery Groceriespt.xlsx

Amount spent per year in each store on


each product
Total spending at each store
Total spending for each year

9 of 15
Using an Index Summary Calculation
1,012 mouse pads were sold via the newspaper ad (the second
highest number in the report), but only 562 copy holders were
sold through the newspaper (one of the lower numbers in the
report). Does this mean that one should only sell mouse pads
in newspaper ads? That is, is the mouse pad/newspaper
combination somehow more "important" than the copy
holder/newspaper combination?

Using an Index Summary Calculation


To get an accurate answer, take into account the total number
of mouse pads sold, the total number of copy holders sold, the
total number of units sold through the newspaper, and the
number of units overall. PivotTable Index calculation returns the
weighted average of each cell in the PivotTable data field,
using the following formula:
(Cell Value) * (Grand Total) / (Row Total) * (Column Total)
In the Index calculation results, the higher the value, the more
important the cell is in the overall results.

10 of 15
Benefits of PivotTable
Conformance to
• most of the formatting options that are applied to
regular Excel ranges and cells
Customizable
• build each report the way you want
Dynamic
• components can be easily moved, filtered, & added
Easy
• Build, maintain & update
Performance
• amazingly fast
Tasks that can be performed
Explore the data:
• Expand/ collapse data, showing the underlying details
• Sort, filter, and group fields and items.
• Change summary functions, and add custom calculations/
formulas
Change the form layout and field arrangement:
• Add, rearrange, and remove fields.
• Change the order of fields or items
Change the layout of columns, rows, and subtotals:
• Turn column and row field headers on or off, or display or hide
blank lines.
• Display subtotals above or below their rows.
• Adjust column widths on refresh.
• Move a column field to the row area or a row field to the column
area.
• Merge or unmerge cells for outer row and column items

11 of 15
Tasks that can be performed
Change the display of blanks and errors:
• Change how errors and empty cells are
displayed.
• Change how items and labels without data
are shown.
• Display or hide blank lines
Change the format:
• Manually and conditionally format cells and
ranges.
• Change the overall PivotTable format style.
• Change the number format for fields.
Limitations and Restrictions
Maximum number of row fields
• 1,048,576
– If you are using a version of Excel prior to 2007, the maximum number is 65,536
Maximum number of column fields
• 16,384
– If you are using a version of Excel prior to 2007, the maximum number is 256
Maximum number of page fields
• 256
Maximum number of data fields
• 256
Maximum number of unique items that can appear in a row, column, or page
field
• 1,048,576
– If you are using Excel 2003, the maximum number is 32,500;
– if you are using a version of Excel prior to 2003, the maximum number is 8,000
Size/ number of PivotTables is limited by
• system memory

12 of 15
PivotChart vs. Standard charts
Row/Column orientation
• Unlike a standard chart, you cannot switch the row/column orientation of a
PivotChart report by using the Select Data Source dialog box
– However, you can pivot the Row and Column labels of the associated PivotTable
report to achieve the same effect
Chart types
• You can change a PivotChart report to any chart type
– except an xy (scatter), stock, or bubble chart
Source data
• Standard charts are linked directly to worksheet cells.
• PivotChart reports are based on the data source of the associated PivotTable
report
• Unlike a standard chart, you cannot change the chart data range in the Select
Data Source dialog box of a PivotChart report
Formatting
• Most formatting - including chart elements that you add, layout, and style - is
preserved when you refresh a PivotChart report
• However, trend lines, data labels, error bars, and other changes to data sets are
not preserved
• Standard charts do not lose this formatting once it is applied
Although you cannot directly resize the data labels in a PivotChart report,
you can increase the font size of the text to effectively resize the labels

Summary

PivotTables work by summarizing the


data in one field (called a data
field) and breaking it down according to
the data in another field

13 of 15
PivotTable is interactive/ designed for:
Querying large amounts of data in many user-friendly ways.
Subtotaling and aggregating numeric data, summarizing data by
categories and subcategories, and creating custom calculations and
formulas.
Expanding and collapsing levels of data to focus your results, and
drilling down to details from the summary data for areas of interest to
you.
Moving rows to columns or columns to rows (or "pivoting") to see
different summaries of the source data.
Filtering, sorting, grouping, and conditionally formatting the most
useful and interesting subset of data to enable you to focus on the
information that you want.
Presenting concise, attractive, and annotated online or printed
reports
Use a PivotTable when
• you want to analyze related totals,
– especially when you have a long list of figures to sum and you want to
compare several facts about each figure

Pivot Table: The most Technologically


Sophisticated Component in Excel
Does its job without using formulas
Essentially a dynamic summary report
generated from a database.
• The database can reside in a worksheet or in
an external file.

A pivot table can help transform endless


rows and columns of numbers into a
meaningful presentation of the data
14 of 15
The most innovative aspect of a pivot
table lies in its interactivity
After you create a pivot table, you can rearrange the
information in almost any way imaginable, and even insert
special formulas that perform new calculations.
You even can create post-hoc groupings of summary
items (for example, you can combine Northern Region
totals with Western Region totals).
The name stems from the fact that you can rotate (that is,
pivot) the table’s row and column headings around the
core data area to give you different views of your
summarized data.
One minor drawback to using a pivot table is:
• unlike a formula-based summary report, a pivot table does
not update automatically when you change the source data.
– However, a single click of the Refresh toolbar button forces a pivot
table to use the latest data.

Thanks

15 of 15

You might also like