core pivot table concepts
TRANSCRIPT
-
8/13/2019 Core Pivot Table Concepts
1/41
PivotAcademy.com
Core Pivot Table ConceptsLesson 2
Bobby Munoz
9/24/2013
An introduction to essential Excel Pivot Table concepts (with illustrations and step-by-step instruction).Copyright 2013 PivotAcademy.com All right reserved
-
8/13/2019 Core Pivot Table Concepts
2/41
1
INTRODUCTION ............................................................................................................................... 2
Sample Data .................................................................................................................................... 2
Core Pivot Table Concepts .............................................................................................................. 3
Summarizing Data ..................................................................................................................................... 5
How is Data Summarized? .................................................................................................................................... 7
Summarizing Data Using Excel Subtotals ............................................................................................................ 10
Summary Functions in Excel ............................................................................................................................... 16
Summarizing Data by Subtotaling (Multiple Columns / Nested Subtotals) ........................................................ 19
Cross Tabular Presentation ..................................................................................................................... 27
Create a Cross Tabular Summary Report in Excel ............................................................................................... 30
Grouping Pivot Table Items..................................................................................................................... 37
Grouping Dates and Times .................................................................................................................................. 38
Grouping Numeric Values ................................................................................................................................... 38
Manually Selected Groups .................................................................................................................................. 39
Next Steps ..................................................................................................................................... 40
-
8/13/2019 Core Pivot Table Concepts
3/41
2
Introduction
In the first lesson, you learned that a pivot table is a tool that enables you to quickly summarize , analyze
and present your data in ways that allow you to better understand it. We also created a number of
pivot table reports to illustrate the ease with which we can create summary reports with Excel pivot
tables. In this lesson, you will learn about the core concepts at work behind the scenes to produce a
pivot table report:
Data Summarization Condense a large number of rows into a concise, summary report Cross Tabulation Presents categories of data with both a row orientation and column
orientation
In explaining these topics, well use a lot of familiar Excel techniques that dont involve the use of a
pivot table , and then well present the pivot table alternative .
In addition, there is one related topic, grouping pivot table items , that is also an important concept with
respect to summarizing data. Well examine creating custom groupings as well (grouping days tomonths, etc.).
Sample DataBelow are the first rows of the data set that we will use throughout this tutorial. The data set contains
sales data extracted from a transactional system. Well use the data to slice and dice sales performance
by date, geographic region and salesperson.
Table 1
Order ID Order Date Region Salesperson Sales Cost
15003 1/1/2013 North Smith 1651 76215004 1/1/2013 South Johnson 1339 602
15005 1/2/2013 North Collier 1567 723
15006 1/2/2013 South Turner 1204 542
15007 1/4/2013 South Williams 155 77
15008 1/4/2013 North Miller 122 48
15009 1/4/2013 South Williams 1599 609
15010 1/6/2013 North Miller 2023 888
15011 1/7/2013 North Collier 1169 539
15012 1/8/2013 South Williams 1173 528
15013 1/8/2013 South Turner 1178 467
15014 1/10/2013 South Williams 1183 580
15015 1/11/2013 South Johnson 1189 511
15016 1/12/2013 North Miller 110 48
15017 1/12/2013 North Smith 119 54
15018 1/12/2013 North Miller 199 89
The data above is organized as a table. In a table data is organized in rows and columns. Each column
has a column heading/name that describes the data beneath it. In our table, each row represents a
-
8/13/2019 Core Pivot Table Concepts
4/41
3
single sales transaction. If you look at the first row of data below the column names, you can see that
Smith is a salesperson who works for the North region and that Smith made a sale totaling $1,651 on
1/1/2013 .
Core Pivot Table ConceptsAs we stated above, there are two key concepts at work when we create and/or modify a pivot table
report:
Data Summarization - Condenses a large amount of data into a concise summary report thatdescribes the entire set of data in summary form , with sufficient detail to illustrate the main
points but without all of the unnecessary data detail that can get in the way of understanding
the data. On the left (Figure 1 ) we have source data before being summarized in the pivot table
report on the right.
Figure 1
Cross Tabular Presentation Facilitates better data visualization by presenting categories ofdata both horizontally and vertically in a cross tabular (crosstab) style report . Crosstab reports
make it easy to see relationships and trends, make comparisons, and identify outliers all in a
report that can be viewed at-a-glance, regardless of the number of rows in the source data.
In Figure 2 (below-right) we have a summary report showing sales by Region , by Order Date .
Both Region and Order Date data appear as rows in the pivot table report.
-
8/13/2019 Core Pivot Table Concepts
5/41
4
Figure 2
By pivoting the Order Date field from a row orientation to a column orientation, we create a
crosstab report and are better able to make better comparisons, see relationships and spot
trends.
Figure 3
By summarizing data you reduce the number of rows in the report, and by laying the summary report
out in a cross tabular view, you can further reduce the number of rows and make it all viewable at-a-
glance. Pivot tables provide an easy to use tool (the Pivot Table Field List, or simply Field List) that
enables us to do all of this visually by point-and-click, drag-and-drop. The result is that you can quickly
-
8/13/2019 Core Pivot Table Concepts
6/41
5
turn a thousand or even a million rows of data into a concise, summary report that you can (i) view at a
glance, and (ii) rearrange whenever your requirements change.
Summarizing DataImagine that you are presented with sales data below for a number salespeople (shaded blue below),
and you are asked to summarize individual sales performance (shaded yellow below) without a pivot
table .
Figure 4
The logical thing to do is to simply add up the sales for each salesperson and present your findings intabular form like we have done below. Below-left in Figure 5 is the source data, and below-right is the
summary report.
-
8/13/2019 Core Pivot Table Concepts
7/41
6
Figure 5
To create our summary report, we first scan the Salesperson column to find the list of salespeople that
appear in the list. We ten list each salesperson on a row in the summary report in Figure 5 .
Next we summarize each salesp ersons sales. As you can see by the yellow shading, Collier appears in
the source data twice. When you add the two sales values associated with Collier, you have a total of
2,736 (1567 + 1169 ). If you look in the formula for Colliers sales in the summary table ( Cell I7), you can
see that it sums both of Colliers sales amounts ( =Sum(E4, E10) ) That is the amount shown next to
Collier in the summary report. We proceeded in similar fashion to create the remaining entries in the
table. By doing so we have created sales subtotals for each salesperson.
After creating subtotals for each salesperson and populating the summary table, we add together the
subtotal for each salesperson to arrive at a grand total. That grand total in the summary report is equal
to the grand total from the source data table (shaded in green in Figure 5 - left). We added/calculated a
grand total on the left to show that the summary report on the right is sourced from the data on the left
and that our summary report describes the entire data set in summary form .
Now lets see how we create that summary report with a pivot table. Figure 6 shows the same report as
a pivot table report. To produce this report we added the Salesperson field to the Row Labels area of
the Field List . That gives us the unique list of salespeople, whereas we scanned the Salesperson column
to create the same list above. We subtotal sales for each salesperson by moving the Sales field in the
Values area of the Field List. As you may recall from Lesson 1, when a field containing all numeric data
-
8/13/2019 Core Pivot Table Concepts
8/41
7
is added to the Values area of the Field List , the default way it is summarized is by summing the values
for the field ( Sales field in this case).
Figure 6
Note: There is a pivot table created in a worksheet in the companion workbook, concepts.xlsx , so youcan experiment. The worksheet is named SCRATCHPAD.
How is Data Summarized?It may be obvious how you might create the summary report (Figure 5 ) in Excel without a pivot table
since the data set is very small, and the report requirements are minimal. When the report
requirements are more complex, and there is a lot more data, it may not be so obvious how to quickly summarize your data to create the report without a pivot table especially the crosstab view of the
data.
Whether you are using the usual Excel techniques or a pivot table, it is important to have a good
understanding of how data is summarized.
Summarization is a two-step process involving:
1. Grouping Data Working with a set of tabular data, put all like rows of data together in groupsbased on what they have in common in a field(s) of interest . In our report a group of data is
created for each salesperson. This can be visualized simply sorting the source data on the
Salesperson column. Here sorting also allows us to quickly find the unique set of salespersons
in the Salesperson column so that we can populate the summary table (Figure 5 ) with entire list
of salespersons.
-
8/13/2019 Core Pivot Table Concepts
9/41
-
8/13/2019 Core Pivot Table Concepts
10/41
9
Figure 8
An aggregate function is one that operates on an entire group of data to calculate a singlesummary result/value for the group . Aggregate functions are called Summary Functions in
Excel pivot tables.
Since we just created the same report another way, our pivot table remains unchanged from the prior
examples.
-
8/13/2019 Core Pivot Table Concepts
11/41
10
Figure 9
Regardless of the different approaches we used above, each time we created the sales summary report
we summarized our data to create the report by:
1. Grouping Data - Found the unique list of salespeople and listed them on rows2. Aggregating Data Summed sales for each salesperson s rows and listed it next to each
salesperson.
Whether we performed the steps manually without a pivot table or with a pivot table, the steps in
producing the report are the same. With the pivot table, the implementation is hidden behind the
scenes. We simply instruct the pivot table what to produce through our Field List choices.
Summarizing Data Using Excel SubtotalsThere are many other ways to create the above summary report in Excel without a pivot table . They are
all logically equivalent. They are just implemented differently and some are more manual than others.
If you are familiar with the Excel Subtotal tool, you may have noticed that the report we created above
can be produced easily using the Excel Subtotal tool.
Subtotals are created using the same two-step process outlined above:
1. Group Data - First sort the data on the column(s) for which you want to create subtotals. Sorting
data is one way to group it together like we did in the previous example. Sorting is arequirement for using the Excel Subtotal tool. Since we are interested in individual salesperson
performance, we will sort on the Salesperson column. You can follow along by performing the
following steps.
Steps to sort our source data:
a) Open the concepts.xlsx workbook.
-
8/13/2019 Core Pivot Table Concepts
12/41
11
b) If it is not already the active sheet, click the SUBTOTALS worksheet tab to reveal thefollowing data set:
Figure 10
c) Select any cell in the range of data that appears in the upper left of the worksheet. I haveselected Cell A1 (Figure 11 below).
d) With any cell in the range selected, click the Data tab on the Excel Ribbon , and then the Sort button in the Sort & Filter group.
Figure 11
You are now presented with the Sort dialog box.
-
8/13/2019 Core Pivot Table Concepts
13/41
12
Figure 12
e) From the Sort dialog box (Figure 12 ), click the Sort by drop down button (shown as 1). SelectSalesperson (shown as 2) from the drop-down menu that appears and then Click OK(shown
as 3).
You are now presented with your data sorted ascending on the Salesperson column. This is
the same sort we showed in the last example. Your data is now physically grouped on the
Salesperson column.
Figure 13
Now that you your data is sorted on Salesperson , you may create subtotals in Step 2 .
-
8/13/2019 Core Pivot Table Concepts
14/41
13
2. Aggregate Data with a Summary Function (Subtotals Version) With any cell in your sourcedata selected, click the Subtotal command button in the Outline group from the Data tab on the
Excel Ribbon (Figure 14 ).
Figure 14
You are now presented with the Subtotal dialog box (Figure 15 ). You are prompted to instruct
Excel (i) which column to group ( Salesperson ), (ii) the summary function to use ( Sum ), and (iii)
column(s) for which you wish to add subtotals ( Sales ).
Figure 15
Please make the selections shown in Figure 15 and click OK to create subtotals for each
salespersons sales . You should now be presented with your data subtotaled (Figure 16 - yellowand green shading added).
-
8/13/2019 Core Pivot Table Concepts
15/41
14
Figure 16
At this point, click the 2 button (Figure 17 - below) in the group and outline control on the upper
left of the image.
Figure 17
You should be presented with a summary table (Figure 18 ) like the one we showed in an earlierexample. You can now cut-and-paste or otherwise extract the information for presentation in a
summary table like we showed above.
-
8/13/2019 Core Pivot Table Concepts
16/41
15
Figure 18
Notice the subtotals for each salesperson and the Grand Tota l match our prior examples.
Clicking the 2 button in Figure 17 collapsed one level of detail (the individual sales transactions).
Once again, the equivalent pivot table version (Figure 19 ) of the above summary report is the
same as the prior examples in which we manually created subtotals.
Figure 19
Select Cell E4 and note the formula for the cell (Figure 20 highlighted in green) for Collier. It
yields the same result but uses a different function to calculate subtotals for each salesperson
than the formula we showed in a prior example (See Figure 8 ).
-
8/13/2019 Core Pivot Table Concepts
17/41
16
Figure 20
We used the Excel Sum function in our prior example (Figure 8 ). Above we see a less specific
function name, Subtotal() . The 9 in the Subtotal functions argument list indicates we want to
sum the values in the Collier group of data. What are the other variants of the Subtotal
function? That brings us to our next important topic, summary functions.
Summary Functions in Excel
As we stated , once we have groups of data (one group for each salespersons rows) , we apply asummary function to each entire group of data (independently of other groups) to produce a single
result for each group . Beyond the Sum function, there are a number of other functions that can be
used: count , average , min , max , product , etc. The Excel Subtotals tool and pivot tables each have 11
built-in summary functions. So, subtotaling in Excel is not limited to summing data. It is not limited in
pivot table either. These similarities are no accident. Pivot Tables are at the core a subtotals tool, a
special subtotals tool with expanded capabilities.
Recall when you created subtotals (Figure 15 ), you were presented with the Subtotal dialog box, and the
default summary function was Sum? We accepted the default ( Sum ), but our choices were many (some
of which are shown below in Figure 21 below). Like the Sum function, each of the summary functions
listed below works on an entire group of data (the rows for each salesperson) and returns a single result
for the group (sum of sales for each salesperson in the above example).
-
8/13/2019 Core Pivot Table Concepts
18/41
17
Figure 21
To change the summary function, select any cell in the subtotaled range of data, and click the Data tab
on the ribbon and then the Subtotal command button from the Outline group as you did before.
Figure 22
Once again you are presented with the Subtotal dialog box (Figure 23 - below). In the Use function:
drop-down list, select Count this time and then click the OK button.
-
8/13/2019 Core Pivot Table Concepts
19/41
18
Figure 23
You should now be presented with subtotals showing count of sales/orders for each salesperson.
Figure 24
-
8/13/2019 Core Pivot Table Concepts
20/41
19
Notice the first argument in the formula for Cell E4 (highlighted in green in Figure 24 ). It is 3 in this
example, but it was 9 (equivalent to the Excel Sum function) in the prior subtotals example (See Figure
20 ). Three indicates that the Count summary function (equivalent to Excels CountA function ) is the
function to use for the subtotal. CountA function counts non-blank cells.
As we just showed in the Count subtotals example (Figure 24 ), you are not limited to using the Sum
function to summarize data in a pivot table (or with Excel subtotals). Excel subtotals and pivot tableseach offer 11 built-in summary functions:
Sum Count (Excel CountA function counts non-blank) Average Min Max Product Count Numbers (Excel Count function counts numbers) StDev (Standard Deviation for a data sample) StDevP (Standard Deviation for a data population) Var (Variance for a data sample) VarP (Variance for a data population)
We will cover summary functions in detail in a later section of this tutorial.
Summarizing Data by Subtotaling (Multiple Columns / Nested Subtotals)When we want to summarize our data for more than one c olumn of data, lets say first by Region and
then by Salesperson , we can create nested subtotals -- without the use of a pivot table. The summary
in Figure 25 below shows each regions contribution to total sales and how each regions sales are
broken down by salesperson.
Figure 25
Nested subtotals are straightforward and once again follow the two step process we have used up to
this point. Instead of just subtotals for each salesperson, you will notice in Figure 26 there is a subtotal
-
8/13/2019 Core Pivot Table Concepts
21/41
20
for each region as well. It should be easy to see how the report in Figure 25 can be constructed with
subtotaled data in Figure 26 below (subtotaled for both Region and Salesperson ).
Figure 26
Steps to create subtotals with nested subtotals :
1.
Group Data - First sort the data on the column s for which you want to create subtotals. Sortingdata groups it together like we did in Step 1 of our prior examples. In our last example, we
sorted on one column of data ( Salesperson ). For nested subtotals we include each column we
want grouped in the sort. Here we will sort by Region and then by Salesperson .
Click the Mx-SUBTOTALS tab in the concepts.xlsx workbook, and you will be presented with
your data set (Figure 27 ).
-
8/13/2019 Core Pivot Table Concepts
22/41
-
8/13/2019 Core Pivot Table Concepts
23/41
22
You are now presented with a sort order (Figure 29 - shading added) that is physically organized
very much like the summary report we wish to create (by Region , by Salesperson ). All North
region rows are grouped together, and then each North regions salespersons rows are grouped
together. Same goes for the South region. To the right of the sorted data is the structure of the
summary report we wish to create. This is not the result of the sort. It is added to illustrate the
mapping from the data you just sorted to the report you are creating.
Figure 29
2. Aggregate Data with a Summary Function Select any cell in your source data ( Mx-SUBTOTALS worksheet). Working from the Data tab click the Subtotals command button in the Outline
group.
Figure 30
You are next presented with the Subtotal dialog box. Make the selections below (Figure 31 ) and
click OK.
-
8/13/2019 Core Pivot Table Concepts
24/41
23
Figure 31
When you click OK, you will be presented with the following subtotaled data (shading added).
Figure 32
At this point you have subtotaled the outer field Region . Region is the outer field because each
salesperson works for a region. It logically makes sense to sort this way, and we will show it that
way on the summary report -- and that will be the order in which the subtotals are created.
With the subtotals shown in Figure 32 above, you now have the Region and Grand Total data
-
8/13/2019 Core Pivot Table Concepts
25/41
24
for the report. The nested subtotal for the Salesperson column will provide each salespersons
totals within each region. Figure 33 shows the partially completed report after subtotaling only
Region column data:
Figure 33
You will now create the nested subtotals for Salesperson . With any cell in your source data
selected, click the Subtotals command button from the Outline group.
Figure 34
You are again presented with the Subtotal dialog box.
-
8/13/2019 Core Pivot Table Concepts
26/41
-
8/13/2019 Core Pivot Table Concepts
27/41
26
Figure 37 below shows the mapping of data into the final subtotals report for sales by Region , by
Salesperson .
Figure 37
The Pivot Table Field List selections to create the above summary report and the equivalent pivot table
are shown in Figure 38 .
Figure 38
-
8/13/2019 Core Pivot Table Concepts
28/41
27
In the pivot table report (Figure 38 - left), we have grouped our data first by Region and then by
Salesperson . So, we first added Region and then added Salesperson field to the Row Labels area of the
Field List (Figure 38 - right). The order in which we arrange them in the Row Labels area of the Field List
is the same as the sort order we used before we subtotaled. Again, we aggregate by putting the Sales
field in the Values area of the Field List .
Subtotaling can help you create summary reports, but there are a few drawbacks:
You basically have to repeat the process each time you wish to look at a new summarization, forinstance sales by salesperson, by date of sale.
If you wish to show some of your categories of data (say Salesperson ) on rows and some ascolumns (say Order Date ), you would have to transpose the data somehow since the Subtotals
tools lays columns/categories of data out in rows. Well cover the concept of showing data in
both row and column orientation in Excel next. It is easy to make a mistake if you choose to extract the data from the subtotals to a summary
table for presentation, like the one above-right.
Cross Tabular PresentationCross tabulation (crosstab) is one way to present summarized data. In a crosstab report, one or more of
the categories/columns of data is arranged horizontally as row(s) in the summary report, and one or
more columns of source data are laid out with a column orientation on the report. Below in Figure 39 ,
Region and Salesperson fields are presented on rows, and Order Date is presented in a column
orientation.
Figure 39
When you have multiple columns of data and many summarized rows of data to present on your report,
it is often easier to understand data that is laid out in a cross tabular view. Cross tabulation is a way you
can make your summary (i) more concise, and (ii) easier to understand.
Below in Figure 40 , we have two versions of a pivot table report summarized by Region , by Order Date .
On the left we have a pivot table report that looks structurally similar to the Region / Salesperson table
-
8/13/2019 Core Pivot Table Concepts
29/41
28
we created with nested subtotals. We have and outer field ( Region ) and a nested (inner) field, Order
Date . On the right, we have the cross tabular view of the same summarized data.
Figure 40
Next, w ell create the report (Figure 40 - right) without a pivot table by using a different approach than
we used in above examples. This approach uses filtering for unique values and conditional aggregate
formulas and does not require us to pre-sort our data.
In the very first example in this lesson (See Figure 5 ), we scanned the table to find the unique list of
salespeople so we could lay them out on rows in the summary report, and then we scanned the table
visually for the sales values that were associated with each salesperson so we could sum their sales.
Figure 41
Although it is a brute force approach, it still fits the model of our two step process of summarizing data:
-
8/13/2019 Core Pivot Table Concepts
30/41
29
1. Grouping Data We found the unique set of salespersons to define the groups (creating onegroup for each salesperson). We listed them on rows in our summary report above (Figure 41 -
right), and
2. Aggregating Data with a Summary Function For each salesperson, sum the correspondingsales values . These summarized values are shown in the Sum of Sales column in the report
above (Figure 41 - right).
This approach although crude is logically similar to how we will create a crosstab report in Excel without
a pivot table. Instead of hunting around the table or sorting this time, we ll employ two non-pivot table
techniques that facilitate crosstab summarization filtering for unique values and aggregating data with
a conditional aggregate function (explained below). Again, we are not required to sort first .
We will use the data in Table 2 to create a crosstab report that summarizes sales by Region , by Order
Date . It is the same data we have used up to this point.
Table 2
Order ID Order Date Region Salesperson Sales Cost15003 1/1/2013 North Smith 1651 762
15004 1/1/2013 South Johnson 1339 602
15005 1/2/2013 North Collier 1567 723
15006 1/2/2013 South Turner 1204 542
15007 1/4/2013 South Williams 155 77
15008 1/4/2013 North Miller 122 48
15009 1/4/2013 South Williams 1599 609
15010 1/6/2013 North Miller 2023 888
15011 1/7/2013 North Collier 1169 539
15012 1/8/2013 South Williams 1173 528
15013 1/8/2013 South Turner 1178 46715014 1/10/2013 South Williams 1183 580
15015 1/11/2013 South Johnson 1189 511
15016 1/12/2013 North Miller 110 48
15017 1/12/2013 North Smith 119 54
15018 1/12/2013 North Miller 199 89
The general steps to create a crosstab summary report without a pivot table:
1. Group Data Filter each column to be included in the report for unique values to define groupsfor both Region and Order Date , and then lay them out in row and column orientation to create
a matrix. This matrix captures all possible combinations of Region and Order Date that can
possibly appear on our report. In (Figure 42 ) regions are listed on rows and dates in columns.
-
8/13/2019 Core Pivot Table Concepts
31/41
30
Figure 42
2. Aggregate Data with a Summary Function Use Excel SumIfs() function to summarize by eachunique combination/grouping (cell in the matrix). For Example in Cell C14 represents a grouping.
It is at the intersection of the North row and the 1/1 column.
Figure 43
The logic of the formula in Cell C14 in Figure 43 : For each row in the source data sum Sales forall rows where Region = B14 (North ) and where Order Date = C13 (1/1 ). Sales , Region and
Date are Excel Names that we created to reference their respective ranges in the source data rather than use Excel ranges. Names are shorthand for typing a Range address. When you followalong with the companion workbook, the Names are already created for you.
Create a Cross Tabular Summary Report in ExcelStep 1 Group Data: Filter for unique values and create the crosstab matrix
Filtering for unique values:
1. Open the concepts.xlsx workbook and click the CROSSTAB worksheet,2. Select Cell A1 (shown in Figure 44 ), and click Advanced from the Data tab, Sort & Filter group.
-
8/13/2019 Core Pivot Table Concepts
32/41
31
Figure 44
You are now presented with the Advanced Filter dialog box .
-
8/13/2019 Core Pivot Table Concepts
33/41
-
8/13/2019 Core Pivot Table Concepts
34/41
-
8/13/2019 Core Pivot Table Concepts
35/41
34
a. Select Range H2:H10 (Figure 49 ) and copy the cells.b. Select Cell C20, Right mouse click, and click Paste Special from the pop-up menu.
Figure 49
c. You will be presented with the Paste Special dialog box. Simply check the check boxnext to Transpose, above the OK button. Finally, click the OK button.
-
8/13/2019 Core Pivot Table Concepts
36/41
35
Figure 50
d. Your worksheet should now look like the one below. Note how the dates have beentransposed (highlighted in green).
Figure 51
e. Finally copy and paste Cells I2:I3 into Cell C21, and you will have the crosstab matrix.
-
8/13/2019 Core Pivot Table Concepts
37/41
36
Figure 52
Step 2 Aggregate Data: Populate Matrix with Summary Values using SumIfs() Function
Select Cell C21 (Figure 53 - below) and enter the formula in the address bar (shown below highlighted in
green) for Cell C21 and press the Enter key . Then copy Cell C21 and Paste it to the Range C21:K22 .
Figure 53
Your completed matrix should look like this:
Figure 54
At this point you can simply format and add row and column grand totals.
-
8/13/2019 Core Pivot Table Concepts
38/41
37
Here are the Pivot Table Field List selections to create the same report:
Figure 55
By examining the matrix (Figure 54 ) we see that we have regions listed as rows and dates as columns.
So, we add Region to the Row Labels area of the Field List and Order Date to the Column Labels area.
Again, we add the field to summarize ( Sales ) to the Values area of the Field List to create the report.
Grouping Pivot Table Items
There is one final topic that relates to summarization that is worth mentioning -- creating customgroupings for your pivot table data. When the groupings of data that you require cant be configuredwith the Field List because they do not explicitly exist in your source data, it may possible to create acustom grouping that meets your requirements.
The most common example of this grouping pivot table items in a custom way is one that you havealready seen, in Lesson 1. It is grouping dates. We grouped individual dates (1/1/2013, etc.) intocalendar months (Jan, Feb, etc.) to make our report easier to view at-a-glance and understand.
Pivot tables provide custom groupings so that you do not have to transform your source data.
There are three types of grouping that you can create:
Dates and Times Numeric Items Manually Selected Items
-
8/13/2019 Core Pivot Table Concepts
39/41
38
Grouping Dates and TimesBelow, individual dates (left) are grouped into quarters (right). Before grouping individual dates intoquarters, we could not see the entire pivot table at-a-glance. So, we collapsed the view of dates for
Miller , Smith , Turner and Williams indicated by the Expand (+) buttons to the left of each. Bygrouping dates into quarters (right), it is easier to see it all at once. Once we grouped individual days
into quarters, we then able to expand the date fields items for all sal espeople by clicking the Expand (+)
button to the left of each salesperson (highlighted in green) and see the entire pivot table at-a-glance.
Figure 56
Grouping Numeric ValuesBelow-left we have Order ID and Sales . We are interested in evaluating sales performance every 50orders. Below-right we have grouped Order ID into numeric intervals of 50.
-
8/13/2019 Core Pivot Table Concepts
40/41
39
Figure 57
Manually Selected GroupsIn this example, our salespersons work in teams, but our source data does not have a column of dataindicating the team in which each salesperson is a member. By creating a custom grouping with a fewclicks of the mouse, we can group our data in ways that do not appear in our source data.
Figure 58
Above, it is as if a new column of data ( Team ) has been added to your source data. In certain cases (likethe one immediately above), when you create groupings, the grouped field (in this case Team ) appearsin the Field List as though it exists in your source data. With some exceptions that will be explained in alater lesson, you may work with the grouped field like any other field add/rearrange in to Field List ,
-
8/13/2019 Core Pivot Table Concepts
41/41