Вы находитесь на странице: 1из 41

PivotAcademy.

com

Core Pivot Table Concepts


Lesson 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

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

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 to months, etc.).

Sample Data
Below 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 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 Order Date 1/1/2013 1/1/2013 1/2/2013 1/2/2013 1/4/2013 1/4/2013 1/4/2013 1/6/2013 1/7/2013 1/8/2013 1/8/2013 1/10/2013 1/11/2013 1/12/2013 1/12/2013 1/12/2013 Region North South North South South North South North North South South South South North North North Salesperson Smith Johnson Collier Turner Williams Miller Williams Miller Collier Williams Turner Williams Johnson Miller Smith Miller Sales 1651 1339 1567 1204 155 122 1599 2023 1169 1173 1178 1183 1189 110 119 199 Cost 762 602 723 542 77 48 609 888 539 528 467 580 511 48 54 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 2

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 Concepts


As 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 that describes 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 of data 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.

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-aglance. 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 4

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 Data
Imagine 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 in tabular form like we have done below. Below-left in Figure 5 is the source data, and below-right is the summary report.

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 salespersons 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

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 you can 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 groups based 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.

Figure 7

Sorting data is not necessarily required to group data, but it is a convenient manual technique, and some of the non-pivot table techniques we are about to utilize will require a sort like the one above. 2. Aggregating Data For each group of rows (each salespersons rows), calculate a single numeric value that describes the group in some way. In the sales summary example (Figure 5), we summed sales for all of the rows in each group (salesperson) and displayed the value as Sum of Sales in our report. The means by which this is done is by applying an aggregate function to each group of data. The aggregate function we used in the example above is the Sum function. In our example it is logically equivalent to what is shown in Figure 8.

Figure 8

An aggregate function is one that operates on an entire group of data to calculate a single summary 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.

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 rows 2. Aggregating Data Summed sales for each salespersons 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 Subtotals


There 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 a requirement 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. 10

b) If it is not already the active sheet, click the SUBTOTALS worksheet tab to reveal the following data set:

Figure 10

c) Select any cell in the range of data that appears in the upper left of the worksheet. I have selected 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. 11

Figure 12

e) From the Sort dialog box (Figure 12), click the Sort by drop down button (shown as 1). Select Salesperson (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.

12

2. Aggregate Data with a Summary Function (Subtotals Version) With any cell in your source data 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 - yellow and green shading added).

13

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 earlier example. You can now cut-and-paste or otherwise extract the information for presentation in a summary table like we showed above.

14

Figure 18

Notice the subtotals for each salesperson and the Grand Total 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).

15

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 a summary 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).

16

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.

17

Figure 23

You should now be presented with subtotals showing count of sales/orders for each salesperson.

Figure 24

18

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 tables each 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 column 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

19

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 columns for which you want to create subtotals. Sorting data 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).

20

Figure 27

With any cell in your source data selected, click the Data tab and then the Sort command button in the Sort & Filter group to open the Sort dialog box.

Figure 28

1. Click the Sort by drop down button (shown as 1 above) and select Region. 2. Click Add Level (shown as 2 above), and the Then by row of choices appears. 3. Select Salesperson (shown as 3 above) from the Then by drop-down list of columns. 4. Finally, click OK (shown as 4 above) to initiate the sort you have configured. 21

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.

22

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 23

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.

24

Figure 35

Please make the above selections in Figure 35 (paying special care that the Replace current subtotals check box highlighted in orange is unchecked as shown), and click OK. Unchecking this checkbox prevents us from losing the Region subtotals we just created. You now have all of the subtotaled data for the Region/Salesperson summary report.

Figure 36

25

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

26

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, for instance sales by salesperson, by date of sale. If you wish to show some of your categories of data (say Salesperson) on rows and some as columns (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 Presentation


Cross 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 27

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, well 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: 28

1. Grouping Data We found the unique set of salespersons to define the groups (creating one group 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 corresponding sales 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, well 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 15003 15004 15005 15006 15007 15008 15009 15010 15011 15012 15013 15014 15015 15016 15017 15018 Order Date 1/1/2013 1/1/2013 1/2/2013 1/2/2013 1/4/2013 1/4/2013 1/4/2013 1/6/2013 1/7/2013 1/8/2013 1/8/2013 1/10/2013 1/11/2013 1/12/2013 1/12/2013 1/12/2013 Region North South North South South North South North North South South South South North North North Salesperson Smith Johnson Collier Turner Williams Miller Williams Miller Collier Williams Turner Williams Johnson Miller Smith Miller Sales 1651 1339 1567 1204 155 122 1599 2023 1169 1173 1178 1183 1189 110 119 199 Cost 762 602 723 542 77 48 609 888 539 528 467 580 511 48 54 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 groups for 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.

29

Figure 42

2. Aggregate Data with a Summary Function Use Excel SumIfs() function to summarize by each unique 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 for all 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 follow along with the companion workbook, the Names are already created for you. Create a Cross Tabular Summary Report in Excel Step 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.

30

Figure 44

You are now presented with the Advanced Filter dialog box.

31

Figure 45

3. Make the entries shown in Figure 45 (above) to filter for the unique list of dates and click OK. You will have the unique values from the Order Date column listed Column H - as shown in Figure 46 (below). Note: List Range is the entire Column B. It may look like an eight in the image.

Figure 46

32

4. To create the unique list of regions from the Region column, Select Cell A1 (Figure 47), and click Advanced from the Data tab, Sort & Filter Group. When presented with the Advanced Filter dialog box, make the following selections and click OK.

Figure 47

You should now see the unique list of regions in Column I.

Figure 48

5. Using the two ranges of unique values, create the matrix: 33

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 box next to Transpose, above the OK button. Finally, click the OK button.

34

Figure 50

d. Your worksheet should now look like the one below. Note how the dates have been transposed (highlighted in green).

Figure 51

e. Finally copy and paste Cells I2:I3 into Cell C21, and you will have the crosstab matrix.

35

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.

36

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 custom groupings for your pivot table data. When the groupings of data that you require cant be configured with the Field List because they do not explicitly exist in your source data, it may possible to create a custom grouping that meets your requirements. The most common example of this grouping pivot table items in a custom way is one that you have already seen, in Lesson 1. It is grouping dates. We grouped individual dates (1/1/2013, etc.) into calendar 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

37

Grouping Dates and Times Below, individual dates (left) are grouped into quarters (right). Before grouping individual dates into quarters, 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. By grouping 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 salespeople 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 Values Below-left we have Order ID and Sales. We are interested in evaluating sales performance every 50 orders. Below-right we have grouped Order ID into numeric intervals of 50.

38

Figure 57

Manually Selected Groups In this example, our salespersons work in teams, but our source data does not have a column of data indicating the team in which each salesperson is a member. By creating a custom grouping with a few clicks 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 (like the one immediately above), when you create groupings, the grouped field (in this case Team) appears in the Field List as though it exists in your source data. With some exceptions that will be explained in a later lesson, you may work with the grouped field like any other field add/rearrange in to Field List, 39

rename the newly created field, etc. Grouping pivot table items can save you time and provide great flexibility in summarizing and analyzing your data.

Next Steps
Please check the course lesson for a video walkthrough of the examples in this guide. There should be an additional companion workbook, concepts-exercises.xslx, with a series of exercises to test your knowledge of this lesson. Video solutions will be posted on the class page for Lesson 2. In the next lesson, we will examine the many ways to create pivot tables. We will put knowledge from this lesson to use once we have the reports created.

40

Вам также может понравиться