Escolar Documentos
Profissional Documentos
Cultura Documentos
Page 1 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Copyright
To share these fundamental skills and capabilities that have become so important in todays
business world an online video series was created and hosted on ReportingSkills.com. The
purpose of the online video series is to show business users how to use the power of Excel
PivotTables to easily summarize data and ask important questions of their data.
This book series was developed to work hand in hand with the online video series to teach
the step by step processes required to use Excel PivotTables. The Kindle book series has
three titles:
E-mail: ian@reportingskills.com
Web: www.icpconsulting.co.za
Page 2 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Table of Contents
Copyright ............................................................................................................................................... 2
Introduction ........................................................................................................................................... 5
Page 3 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Accumulative Percentages................................................................................................................ 48
% of Calculation ................................................................................................................................ 51
Review .................................................................................................................................................. 57
Page 4 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Introduction
Organizations and companies are facing a flood of data from the numerous business
systems that collect data on an ongoing basis. No matter which area of business that you
work in; it is important to base your decisions on data. In this book we will teach you how to
analyze business data and improve your business decisions.
Traditionally IT has developed reports and dashboards for business users. This tended to
be frustrating for business users who wanted to explore and understand their data in more
detail. However this is now changing with a number of new technologies and tools being
developed that allow the business user to access vast quantities of data and to ask
questions about their data in ways that was not previously possible. In this series we will be
focusing on the Microsoft Excel PivotTable technology; however there are a number of other
tools that are worth investigating and researching such as Tableau software.
PivotTables provide new capabilities to the business user. Instead of using spreadsheets
and formulas to try and understand business and marketing data, PivotTables easily
aggregate and summarize data in a couple of clicks. In my training courses I tell the
delegates that instead of you doing the work for Excel, with PivotTables you get Excel to do
the work for you.
As your PivotTables skills improve you will learn different types of calculations and analysis
that will provide even deeper insight into business and marketing data. To start with users
will create comparisons these tend to be reports such as Sales by Country, Sales by Product
or Profit by Customer. Comparisons are primarily the main type of reporting that most users
will produce, but to create these with spreadsheet technology is laborious and time
consuming.
The next level of analysis is to understand how data changes over time. Time analysis
provides an understanding of trends, seasonality and cycles, which is important for
developing forecasts and future scenarios. Excel PivotTables make it easy to view data by
Year, or Month, or Quarter or any other combination of date formats.
Ranking analysis makes it easy for business users to perform Top or Bottom 20 analysis or
to easily rank customers and products. Ranking analysis allows business users to
understand which items contribute the most important amounts and which items dont.
Ranking analysis is an important tool for managers to identify key areas to focus on.
Page 5 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
managers with important insight to understand which customers or products they should be
focusing on.
Frequency analysis is another powerful form of analysis that allows the user to understand
the frequency of events or occurrences. Frequency analysis groups data into buckets or
bins. A common example is for companies to analyze how many employees they have
between the ages of 20 and 30, 31 and 40, 41 and 50, and so on. The company could also
analyze how many employees earn salaries between $10 000 and $ 20 000, $20 000 and $
30 000, and so on.
Learning these forms of analysis will enable business users to ask better questions about
their data. Better questions leads to new insight and intelligence which leads to better
decision making. Business users who are able to discover and understand new patterns
and relationships within data will be able to develop new opportunities and create
competitive advantage for their companies.
Page 6 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
To follow the activities in this book please download the example Training Data file from
http://www.reportingskills.com/training-data.html
Page 7 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
PivotTables are a powerful technology that has been available in Excel for many years.
PivotTables are able to aggregate data very quickly and allow business users to ask
questions about their data that would take a long time to develop using standard
spreadsheets and formulas.
The capabilities of PivotTables in Excel have developed and have been enhanced
dramatically through the years. The latest versions of Excel now include powerful
calculations that provide business users with the ability to perform complex analysis on their
data in a couple of clicks and a few seconds..
PivotTables use a simple approach of dragging and dropping fields into boxes. The
PivotTable is then created from the fields that have been dropped into these boxes. Do not
worry if this seems a little confusing, it is actually really easy we will go into detail to
explain how PivotTables are created further in the book.
Excel develops the PivotTable in real time displaying the results of the input to the user
instantaneously. The user does not have to go through any long processes to design and
develop reports, and then to run the report. The ease of creating PivotTables makes it easy
for business users to ask questions and to discover new insight from their data.
The PivotTable comprises of two sections. The first section is where the user drags and
drops the fields and the second section displays the results.
Page 8 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The PivotTable Field List is used to select the fields that will be aggregated and summarized
in the PivotTable. Four boxes are available at the bottom of the Field List. The user is able
to drag and drop fields into the four boxes to create many different aggregations and reports
with a couple of clicks of the mouse.
The second area displays the results of the calculations. The PivotTable is displayed in the
spreadsheet so the calculations from the PivotTable can be used in traditional formulas in
the spreadsheet area.
Page 9 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Important Points
In this book we can use Excel 2007 or Excel 2010 to create the PivotTables. There are
some important differences between the two versions that we would like to highlight at the
start of the book to assist you with dealing these differences during the exercises that you
will complete.
In the book we are going to use a series of powerful calculations to perform the analysis of
business data. Excel 2007 and Excel 2010 access these calculations in different ways.
To access the Show Values As calculations in Excel 2007 use the Field Settings icon
under the PivotTable Tools Option menu.
In Excel 2010 the Show Values As calculations can be accessed from the ribbon under the
Show Values As icon.
Page 10 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
A second method to access the Show Values As calculations is to use the Right Click
context menu when the cell selector is on a Measure in a PivotTable.
Another important difference is that Excel 2010 introduced a number of powerful calculations
that are not in Excel 2007.
Page 11 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The first step to creating amazing data analysis and business discovery is to correctly
structure your data for PivotTables. The data needs to be in an Excel spreadsheet before
you can create the PivotTable. Reports from business systems and databases normally
provide good data for analysis.
The structure of the data needs to be in a specific format to be able to create PivotTables.
The first rule is that each column represents a field of data. It is a good idea to give each
column a meaningful name as this will help when you are creating PivotTables. For example
Customer Name, Region, Order Date and Sales.
The second rule is that each row represents a record of data. If you are using sales data
then a row may represent a sales order. The row may include information such as the Order
number, who the customer is, what was the order date, what was sold, how many and the
total value.
The third rule is that the data must only include the raw data that you would like the
PivotTable to calculate. The table of data must not include sub totals or grand totals. If you
import data from other systems or download reports from business systems it is important to
clean up any totals, header or footer information.
The fourth rule is that there should be no blank rows or blank columns in the table of data. If
there are any blank rows or columns please delete them so that the data is continuous.
Please review the data in the training data file to see an example of how data should be
structured.
Page 12 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Great; we now have our first data source to be able to ask questions and discover new
insight from. The Sales Manager phoned first thing in the morning and requested that you
develop the following reports that must be presented at the 3 pm sales meeting.
At this point you need to have the training data loaded into Sheet 1 of an Excel workbook.
Developing a PivotTable is straight forward. Make sure the cell selector is placed on a cell
that is part of the training data that you want to analyze. In this case place the cell selector
on A1. Click on the Insert menu option and then select the PivotTable icon. Select
PivotTable.
Excel will ask where the data is that you would like to use for the creation of the PivotTable.
Excel will normally correctly enter the cell references for the table of data. If Excel does not
have the correct cell references then you will need to enter the cell references or use the
mouse to select the table of data.
We suggest that you select a New Worksheet for the PivotTable to be placed. It is always a
good idea to keep analysis separate from the source data. As you will see later in the book
it is extremely easy to add new data to existing source data and be able to refresh existing
PivotTables.
Page 13 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The PivotTable screen is opened. The screen consists of two main sections. The first
section to the right of the screen is a listing of the fields in the data source. Remember we
said that it was a good idea to name the fields in a meaningful way.
Below the list of fields are four boxes named Row Labels, Column Labels, Values and
Report Filter. Lets look at an example of using the different boxes to create PivotTables.
The second part of the screen is used to display the results of the PivotTable.
Page 14 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
When the Country field was selected in the Row Labels box, the PivotTable display is
updated to show each unique record of the Country field from the data source. In this case
Excel goes through all the records in the Country field and determines that there are six
unique values and displays these on the PivotTable.
The Values box is usually used to display numeric values such as Order Quantity, Sales
and Profit.
1. Drag and Drop the Sales field into the Values box
Excel calculates the total Sales for each of the Countries. This provides the information for
the first report that was requested by the Sales Manager.
Formatting Numbers
The display of the numbers is currently not very easy to read and understand. Some
numbers have two decimal places and others one decimal place. The numbers need to be
cleaned up to make them easier to read and understand.
Please become familiar with this method of formatting numbers as you will find yourself
formatting number fields often when you create PivotTables.
Page 15 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The Sum of Sales amounts are now better formatted with no decimal places and thousand
separators.
Another important technique is to learn how to create custom number formats. It is much
easier to understand $ 310 K then $ 310 143.98 or to understand $ 1.23 M rather than $ 1
232 343.
In this example we are going to create a report displaying Sales by Category and format it
to display a K for the thousands.
Page 16 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The 0 denotes that a whole number is being used by Excel. The 0, denotes that Excel must
move to the first thousands separator. The space with the K means that Excel must place
a K after the first thousand separator.
Page 17 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Creating Millions
In this example we are going to create a report that displays the Sales by Country and
displays the amount with an M for millions.
The 0 denotes that a whole number is being used. The two commas denote that Excel will
now go back two thousand separator amounts and will then place the M after a space.
When millions are being displayed it is often a good idea to use decimal points to create a
more accurate display of the numbers.
Page 18 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Page 19 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
It is very easy to change the Value that is being used in a PivotTable. In the previous
example we calculated the Sales for each Country. The Sales Manager has now requested
a Sales report showing the total Profit by Country.
Firstly we need to remove the existing Sales value. There are two ways we can do this.
The first is to remove the tick mark next to the Sales value in the fields list.
The second method is to drag and drop the Sales field out of the Values box. Drag the
Sales field into the spreadsheet and drop the field. The Sales field will be removed from the
Values box.
There are two methods to calculate the total Profit by Country. The first method is to tick
the box next to the Profit field. The Profit field is added to the Values box and the Profit
field is also displayed in the PivotTable. Remember to format the numbers using Right
Click, select Number Format, then Number and format to no decimals and use the
thousands separator.
The second method is to drag the Profit field and to drop it in the Values box. This will also
add the Profit field to the PivotTable.
The same method can be used to change the Dimension that is being displayed in the
PivotTable. Lets get to know a little bit of terminology when we are working with
PivotTables. A Dimension is normally a text or a category field. For example Region,
Customer Name, Product Category and Product Name are all examples of Dimensions.
A Dimension can also be a Date field. Date fields normally include Order Date and Ship
Date. We will be looking at using Date fields in a later section. Date fields are very useful
for understanding trends, cycles and seasonality. Dimensions are normally placed in the
Row and Column boxes.
The second type of fields is Measures. Measures are normally numerical fields, for example
Sales, Profit and Order Quantity. Measures are normally placed in the Values box.
Page 20 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Remember that the Sales Manager wanted to know the total Sales by Product. Use the
Clear icon to clear the data from the existing PivotTable. To access the Clear Icon, go to
the PivotTable Tools menu option. The PivotTable Tools menu will be visible when the cell
selector is on the PivotTable. Please note that if the cell selector is not on the PivotTable
then the PivotTable Tools menu will not be displayed. Select the dropdown and click Clear
All. This will clear the PivotTable.
Page 21 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
So now you are able to create quick PivotTables that can answer a variety of questions.
You should be able to quickly answer the following questions. What is the total Profit by
Customer? What is the total Sales by Category? What is the total Order Quantity sold by
Product?
Example
As you can see it is easy to get quick answers to these questions. But what happens if you
would like to know the answers to more sophisticated questions. Lets say the Sales
Manager would like to know the total Sales by Country for each Business Segment.
Excel creates a PivotTable displaying the Sales for each Business Segment for each
Country. The PivotTable can also be changed to display the Business Segment
underneath the Country.
1. Drag the Business Segment from the Column box to the Row box
2. Make sure the Business Segment is underneath the Country field
This view is called a nested hierarchy and you can add additional fields to show further
levels of detail. For example you could add Category underneath Business Segment. The
PivotTable would now display the Sales for each Country with each Business Segment
and the Categories for each Business Segments.
By changing the order of the fields new reports can be developed. Drag the Business
Segment field above the Country field. The new report now shows each Business
Page 22 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Segment with the Sales breakdown by Country. As you can see complex reports can be
developed very quickly with PivotTables.
Page 23 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
When you are creating your management reports or key metrics you may want to compare
more than one Measure. The Values box allows the user to accumulate a number of fields
to show different values such as Sales, Profit and Order Quantity in one PivotTable.
Example
The Sales Manager would like you to develop a report that displays the total Sales and
Profit for each Country.
More complex reports can be created by combining more than one Dimension with more
than one Measure. The Sales Manager would like to see a report of Sales and Profit by
Country and Business Segment.
The PivotTable is created displaying the Sum of Sales for each Business Segment. Once
all the Business Segments have been displayed then the Sum of Profit is displayed. The
user may want to change the order so that the Sum of Sales and Sum of Profit are shown
side by side for each Business Segment.
1. Move the Business Segment above the Values field in the Column box
Page 24 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The order of the fields is now changed so that the Sum of Sales and Sum of Profit are
displayed side by side.
Page 25 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Excel provides an easy method to format PivotTables. If you are already familiar with
formatting Tables in Excel, then you will find formatting PivotTables very similar.
The PivotTable Styles options provide a number of predefined style templates that the user
can easily apply.
The PivotTable Styles can be changed according to the selection of PivotTable Styles
Options. Style options will be enabled according to the selection of specific options.
Row Headers Turns on or off formatting options for the row headers
Column Headers Turns on or off the formatting for the column headers
Banded Rows Turn on or off banded row formatting
Banded Columns Turn on or off banded columns
Report Layouts
The report layouts option changes the format of how the PivotTable is displayed.
1. Move the Business Segment field from the Column box to the Row box
2. Select the Report Layout icon
3. Experiment with
a. Compact
b. Outline
c. Tabular
Page 26 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Compact form is the default when the PivotTable is created. The Compact form condenses
the row fields into one column. The Outline form displays the Row fields in a separate
column. The Tabular form displays the PivotTable in the same format as the Outline view,
but also formats the PivotTable with gridlines in the same way as a spreadsheet.
There are also a couple of additional options for Excel 2010. Repeat All Item Labels will
display all the item labels in the Outline and Tabular views. This is particularly useful if you
are creating a PivotTable that will be used as a summary table for another PivotTable.
Turning on the Repeat All Item Labels and using the Outline or Tabular form will allow you
to easily copy the PivotTable and use it as a source table.
Page 27 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Sub totals and grand totals provide an additional level of detail when you are analyzing your
data. Excel provides a number of useful options to change the formatting of the grand totals
and sub totals.
1. Create a PivotTable with Country and Business Segment in the Row box
2. Place Sales and Profit in the Values box
3. Format the Sales and Profit values to zero decimals and thousands seperators
Three options are displayed which will change the way that sub totals are displayed in the
PivotTable.
The display of the grand totals can also be controlled by the user.
Page 28 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
1. Move the Business Segment field from the Row box to the Column box
2. Remove the Profit field from the Values box
Off for Rows and Columns Will turn off the grand totals on the PivotTable
On for Rows and Columns Turns on the grand totals for rows and columns
On for Rows Only Only displays the grand totals for rows
On for Columns Only Only displays the grand totals for columns
Page 29 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
It is very easy to ask different types of questions about your data. So far we have only
asked Excel to Sum the total Sales or Profit for a specific category of data such as Country.
We can easily get Excel PivotTables to calculate different methods of calculations such as
Average, Count, Max and Min. Many users will already be familiar with these calculations
having used them in formulas in spreadsheets.
Average Is the same as the =Average formula. Calculates the average amount
Count Is the same as the =Count formula. Calculates the number of occurrences
Max Is the same as the =Max formula. Will identify the highest individual amount
in the range
Min Is the same as the =Min formula. Will identify the lowest individual amount in
the range
Example
The Sales Manager would like to you to calculate the following for each Country:
Excel will display the total Profit for each Country. We need to change the method of the
calculation to Count. There are a number of methods we can use to change the calculation
method.
Page 30 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
6. The number of rows are now counted and displayed in the results that meet the
criteria. In this case the number of rows will be counted for each Country, which will
count the number of transactions
The next question requires us to change the method of summarizing values by to calculate
the Average Profit amount for each Country.
4. Select Average
5. Right Click and Select Number Format
6. Format the number to zero decimals and use the thousands separator
The third question requires us to identify what the highest Profit amount was for each
Country.
Page 31 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The final method is to identify the lowest Profit that was generated by a transaction in the
Country.
The ability to change the method summary provides many powerful options for asking
different questions about your data.
Page 32 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Ranking Analysis
In this section we are going to review a number of different methods to rank data. The first
method is to do simple sorts of data. Sorting makes it easy to rank your data from highest to
lowest or lowest to highest. Another form of ranking analysis is to understand who your top
10 customers are or what the bottom 20 products are. Top 10 analysis is a powerful method
to understand which items are contributing the most or least to the business.
Now that we have started creating some basic forms of analysis the Sales Manager would
like us to start answering some further questions:
The filtering and sorting capabilities within PivotTables provide the ability to answer these
questions. Lets start with the first question of which Product has the highest Sales
The Sales field is sorted from highest to lowest showing that Mountain-200 has the highest
Sales amount.
To find which Product has the lowest Sales, select the A to Z option. The Sales amounts
are now sorted from lowest to highest displaying that LL Road Seat/Saddle 1 has the lowest
Sales.
Page 33 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Filtering Data
PivotTables provide powerful filtering capabilities for users who have used the Tables
feature in Excel. To access the filtering capabilities the user needs to click on the dropdown
that appears in the first column.
The dropdown provides a number of options. The first couple of options provide sorting
capabilities which are the same as the ones on the PivotTable Tools Options.
Label filters are used with text fields. Label filters allow the user to filter text according to
different criteria such as Begins With, Contains or Ends With.
Value filters are used to filter the data according to Measures. Users can find data that
equals certain amounts, does not equal certain amounts, is between specific amounts,
greater than or less than specified amounts.
To find which Products had Sales over $ 100 000 we will use the Values filter.
Page 34 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The next question is to identify the Products with Sales less than $ 2000.
To identify Products which have over 500 transactions we need to change the method of
summary to Count.
The last question is to identify Products which have an average Profit of less than $ 10.
Remove the Sales field from the Values box
Page 35 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Top 10 Analysis
Another popular form of analysis is to identify the Top 10 or 20 of an item or the bottom 10 or
20 items. Top 10 analysis allows the user to easily understand which items, customers or
products are contributing the most to Sales or Profit. For example we may be interested in
who are our Top 20 Customers for the Year for Sales.
Excel will create a PivotTable that displays the total Sales by Customer. However the table
is sorted by Customer so it would be difficult to find the Top 20 Customers. We could use
the Sort function and sort the Sales from highest to lowest. This would then list the
Customers according to their Sales from highest to lowest. However this does not solve
our problem as we still have the full list of Customers and we do not have a Total for the
Top 20 Customers.
8. Select the Filter dropdown button next to the Row Labels heading
9. Select Values Filters
10. Select Top 10
Page 36 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
At the bottom of the list is an option called Top 10. Select the option and a new dialog box
opens.
The first option allows the user to select between Top or Bottom. For this example we will
keep it as Top. In the second field you need to enter the number of items that you would like
to display. In this case we would like to see the Top 20 Customers. The next field allows
the user to change between the number of items or percentage that they would like to
view. This is a useful option when you would like to see how many Customers make up
your Top 20% of Sales. We will look at this option in more detail later in the section. The
last field allows the user to change the field that is used for the analysis. This is useful if you
have more than one measure in your PivotTable. For example you may have a PivotTable
with Customer, Sales and Profit, you can then do a Top 10 analysis and display the
Customers with the top Profit. The PivotTable will now display the Customers Sales and
Profits values.
To summarize:
Notice how the table is filtered and only the Top 20 Customers are now displayed. A nice
touch is the grand total which displays the total sales for the Top 20 customers.
In this example we have displayed the Top 20 Customers by Sales for the Year. We can
just as easily display the bottom 20% of Customers by Sales.
The PivotTable will now display the bottom 20% Customers by Sales. A total of 448
Customers contribute the bottom 20% of Sales in the organization. This means that 448
out of 633 or 70.7% of the Customers contribute only 20% of Sales. This type of outcome
is quite common in companies you tend to find that a large number of Customers or
Products contribute only a relatively small proportion of results. This is important as a
Page 37 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
manager, the manager is now able to know which Customers and Products they should be
focusing on. If we do the same exercise, but this time we look for the Top 20% of
Customers by Sales we see that 23 Customers out of 633 or 3.6% contribute the Top 20%
of Sales.
In this example we have used the Sum of Sales to do the analysis, however using Profit is
actually a better method for doing this form of analysis. Profit will give you better insight into
which Customers and Products are actually contributing to the bottom line. You may often
find that specific Customers or Products may contribute a large amount of Sales, but very
little Profit.
Experiment with changing Customers to Products and Sum of Sales to Sum of Profit.
See what new insight you can generate.
Largest to Smallest
A powerful function in Excel PivotTables is the ability to Rank items from largest to smallest
or from smallest to largest. Please note that this function is available in Excel 2010 and not
in Excel 2007.
Example
The Sales Manager would like to see a report listing the Customers in alphabetical order.
The report must display the total Sales and Profit for the Customer. The report must also
display the Ranking for the Customers from largest to smallest in terms of the Sales and
Profit.
Page 38 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Excel calculates the Ranking for the Customer dependent on the Sales versus all the other
Customer Sales.
The report now displays a listing of Customers in alphabetical order. The total Sales and
Profit for the Customer is displayed along with the Sales Ranking and Profit Ranking.
Page 39 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Trends are an important tool in any business users decision making process. Trends
provide an understanding of how data moves or changes over time. Excel PivotTables
provide some nifty tools to assist the business user to analyze data over time.
Trends provide important insight into whether a trend is increasing, decreasing or staying
stable over time. Using our example of the Sales Manager; trends will assist the Sales
Manager to understand which Products and Customers are increasing in revenue and
profitability and which ones are decreasing. Trends can also show up when there are cycles
or seasonality happening with Sales of Products. The Sales Manager can pick up that
certain Products only sell well during certain months of the year and not during others. This
helps with forecasting requirements and demands for these Products.
Example
Sales by Year
Sales by Quarter
Sales by Month
Sales by Year and Quarter
Sales by Year and Month
Sales by Quarter by Country
Sales by Month by Business Segment
Lets look at the first report requirement which is to produce a report displaying Sales by
Year. To create a report over time it is important to use a date field. In the field list we have
the Sales Date field that can be used for the calculations.
Excel will display the Sales Date at the Day level and will Sum the Sales for each day.
The power of the ability to view reports in different date formats comes from the ability to
change how Excel groups date data.
Page 40 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
1. Select one of the cells for the Sales Date field in the PivotTable
2. Right Click on the Sales Date field
3. Select Group
You can also use the Group function under PivotTable Tools Options
1. Select Group
The Group option provides a number of useful methods for grouping the Sales Date data.
Starting At: This is the start date for the data that Excel will use for the PivotTable.
So if you only want data for 2012, then enter 1 Jan 2012
Ending At: This is the last date for the data that Excel will use for the PivotTable.
Enter 31 Dec 2012
By: This option determines how Excel will group the data. We will be analyzing
Months, Quarters and Years.
Sales by Year
Page 41 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Sales by Quarter
The next requirement is to produce a report displaying the Sales by Quarter. In this
example we are not reviewing the Year, so all the data from the four different years will be
aggregated into the report. This is useful to review whether some Quarters are higher than
others, which would show seasonality and allow more accurate forecasting.
Sales by Month
In the same way we can also analyze the Sales by Month to see if there is seasonality for
certain months. Again this will help managers be able to plan and forecast better.
Page 42 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
In the next report the Sales data is summarized by Year and Quarter. This provides an
understanding of the Sales over the years and can be graphed to show the trend over time.
Displaying Sales by Years and Months is a popular management report to understand the
performance of the company. As you have seen it is really easy to change the way that we
view date data with PivotTables.
Page 43 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
In a similar way we can easily create management reports that display the Months across
the top of the report. Remember that if you have multiple years of data then you need to
produce this report with Years and Months and then filter the Years to show only the Year
that you want to include in the report.
Page 44 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Contribution Analysis
Example
The Sales Manager would like you to create the following reports:
The first report is to understand the percentage contribution of Sales by each Country.
Page 45 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Excel will apply the calculation to the Sales figures and automatically calculate the
percentage contribution of each Country.
To apply the % of Column Total calculation in Excel 2010 uses the PivotTable Tools
Option menu Show Values As icon.
In this report we will create a table displaying the percentage contribution of Sales for each
Business Segment in each Country.
1. Drag Business Segment to the Column box (Make sure Country is in Row and
Sales in Values)
2. Select the Field Setting icon (Excel 2007) or the Show Values As icon (Excel 2010)
3. Select % of Grand Total
Page 46 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
In this report we can see the percentage contribution of each combination of Country and
Business Segment to the grand total of Sales. Also try the % of Column Total calculation
and % of Row Total calculation.
Sometimes its necessary to create a report with more than one level. Lets use the example
of each Country has Sales for several Business Segments. You would like to understand
what percentage of Sales for each Business Segment contributes to the Country total
Sales. In addition you would also like to understand the percentage contribution that each
Country contributes to the total Sales.
This is a two level contribution calculation. At the first level Excel needs to calculate how
much percentage contribution each Business Segment is contributing to the Country
Sales and at the second level Excel needs to calculate the percentage contribution for each
Country to the total Sales. In Excel PivotTables this is called a % of Parent calculation.
Please note that this calculation is available in Excel 2010 and not 2007.
Example
The Sales Manager would like you to create a report that shows the total Sales for each
Business Segment for each Country and to display the total Sales for all the countries. In
addition the Sales Manager would like to have the percentage contribution of each of the
Business Segments to the Sales total for the Country and for the percentage contribution
of each of the Countries to the total Sales.
Page 47 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Accumulative Percentages
Another powerful form of analysis is to understand the accumulative percentage for an item.
In the ranking analysis we discussed the power of understanding which Products or which
Customers contributed the Top 20 % of Profit or to understand which items contributed the
bottom 20%. This form of analysis is called Pareto Analysis or the 80 / 20 rule. The real
power of the Pareto Analysis is that is allows the business user to understand where they
should be focusing their efforts.
Example
The Sales manager would like you to analyze the Products. He would like to know what
percentage of Products generate 80% of the Profit and what percentage of Products
generate the bottom 20% of Profit.
Page 48 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The PivotTable displays the Profit amount, Profit percentage and the accumulative Profit
percentage for each Product. We can easily see that 80% of the accumulative Profit is
generated by 11 out of a total of 93 Products, which is 11.8%. Therefore 82 or 88.2% of
Products generate the bottom 20% of Profit.
Replace the Products field with the Customer field and perform the same analysis. You
will notice that the third copy of Profit now displays a N/A. To resolve this, select the Show
Values As icon and click on the % Running Total In calculation. Change the Base field
from Products to Customers.
Place the cell selector in the second copy of Profit and Sort from highest to lowest. You
can now do the analysis. The analysis will show that 185 Customers out of 633 (29.2%)
contribute 80% of the Profit. Therefore 70.8% of Customers contribute the bottom 20% of
Profit.
Page 49 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Calculating Variances
Calculating the difference or the variance between values happens often in management
reporting. Excel provides two calculations that calculate the difference between items in
PivotTables. The first calculation is the Difference From, which calculates the difference
between two values and the second is the % Difference From which calculates the
percentage between two values.
Example
The Sales Manager would like to know the difference between the Sales for February and
January. He would like to know whether the difference in Sales between the two months
was positive, negative or the amounts stayed the same. In addition the Sales Manager
would like to know the difference for every subsequent month and the previous month i.e.
what was the difference between February and March etc.
The Sales Manager would also like to view the percentage differences between the two
months on the same PivotTable (Excel 2010).
Page 50 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
% of Calculation
The % of calculation provides a different perspective to the difference between two values.
With the % of calculation the user selects a specific item as a benchmark. Excel then
calculates the difference between the other items and the benchmark as a percentage. This
calculation provides a powerful method to understand how items differ in a percentage
format using a benchmark.
Example
The Sales Manager would like a report displaying the Sales by Country in a percentage
format. The Sales Manager would like you to use the Sales for France as a benchmark and
the French Sales must display as a 100% on the report. The other Countries Sales must
display the percentage difference to the French Sales figures.
Page 51 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Example
The Sales Manager would like to know the number of Sales Orders that make a Profit
between $ 0 and $ 1000, $ 1000 and $ 2000, $ 2000 and $ 3000 and so on.
The PivotTable creates the frequency groupings of 0 to 1000, 1000 to 2000, 2000 to 3000
and greater than 3000. The second part is to count the number of occurrences of the Profit
being in these ranges.
Page 52 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
The PivotTable counts the number of rows where the Profit is in the range of 0 to 1000,
1000 to 2000, 2000 to 3000 and greater than 3000.
In this example 44068 rows have a Profit amount that is 0 to 1000, 8132 rows that have a
Profit of 1000 to 2000, 3924 rows that have a Profit of 2000 to 3000 and 4795 rows that
have a Profit greater than 3000.
Page 53 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Excel PivotTables provide an ability to create your own custom calculations. Calculated
fields allow the user to create new calculations that do not currently exist.
In this example we are going to create a Calculated Field for Profit Ratio. Profit Ratio is
calculated by Summing the Profit and dividing it by the Sum of the Sales. The result is
then multiplied by 100 to calculate a percentage amount.
Example
The Sales Manager would like you to calculate the Profit Ratio for the following:
By Country
By Product
By Customer
By Country and Business Segment
The Calculated Field dialog box displays a list of fields from the PivotTable.
Page 54 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
4. Double click the Profit field. The Profit field is placed in the Formula
5. Enter the divide sign /
6. Double click the Sales field. The Sales field is placed in the Formula
7. Your formula should read = Profit / Sales
8. Click the Add button
9. Click Ok
The calculated field has been added to the list of fields and will also display on the
PivotTable. The value that is displayed in the PivotTable is the Profit Ratio for all the data
in the data source since we do not have any fields in the Row and Column boxes.
As you can see it is very easy to change the Dimensions that are used with Calculated
Fields.
Page 55 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Updating Data
When you design your PivotTable you should keep your source data on a separate sheet to
your analysis. Each PivotTable should therefore be on its own sheet. This important
concept means that you should always separate source data from analysis. A key reason
for separating source data from analysis is to be able to easily update the source data. The
analysis PivotTable can then be easily refreshed with the inclusion of the new data.
Data can be easily added to the bottom of an existing source data sheet. It is important to
make sure that the order of the columns is in the same order as the original source sheet.
Adding data to existing sheets allows the user to create historical data, analysis and
determine trends.
If new data is added to an existing source data sheet then the PivotTable needs to be
updated to know where the new data is.
Once the Data Source area has been correctly updated, the second step is to refresh the
PivotTable.
Page 56 of 57
Busi ness D ata A nal ysi s wi th E xcel Pi votT abl es
Review
In this book we have introduced the power of PivotTables to quickly and easily aggregate
and summarize large volumes of data. PivotTables change the role of the business user
from a passive receiver of reporting information to an active participant who is able to
discover and gain new insight from data.
We have introduced new techniques and methods that allow business users to engage in
business discovery and to ask meaningful questions of their data. Techniques such as
comparisons, trend analysis, rankings, contribution and frequency analysis provide powerful
methods to ask questions of data and develop new intelligence.
The skills and capabilities covered in this book will make you a champion of new insight in
your organization. The next set of skills and capabilities to develop are covered in the next
book called Visual Data Analysis with Excel PivotTables. Visual analysis allows people to
easily see trends, comparisons, contributions and frequencies. The Visual analysis book
covers creating the different types of graphs, trends and also using conditional formatting to
highlight data.
Excel is also always developing new tools that will help the business user analyze data
better. PowerPivot was recently launched for Excel 2010. PowerPivot provides some
extremely powerful tools such as a database that can hold millions of rows of data, the ability
to create PivotTables from multiple tables, create relationships between tables and a new
formula language called DAX that includes a number of new powerful formulas. The book
called Business Data Analysis with PowerPivot will detail how to use this powerful product
for data analysis.
The new version of Excel 2013 incorporates PowerPivot into the product without being a
separate add-in. Excel 2013 also introduces PowerView which allows users to create
interactive dashboards of graphs, tables and slicers that can be distributed through the
organization using SharePoint technology.
So as you can see there is an exciting range of products that will only enhance your
capabilities to analyze, understand and generate insight from your data.
Page 57 of 57