CHAPTER 4 Excel More Skills 13 Create PivotTable Reports A PivotTable report is an interactive, cross-tabulated Excel report used to summarize and analyze data. PivotTable reports are used to ask questions about large amounts of data in many ways. For example, you can expand and collapse summary categories to view either the summary data or details within a summary category of particular interest. To create a PivotTable report, you define its source data, specify a location in the workbook for the PivotTable report, and then lay out the fields. You can then explore the data by rearranging fields; changing the layout of columns, rows, and subtotals; or changing the report format. To complete this workbook, you will need the following file: e04_containers You will save your workbook as: Lastname_Firstname_e04_Containers 1. Start Excel. From your student data files, open e04_containers. Save the workbook in your Excel Chapter 4 folder as Lastname_Firstname_e04_Containers and then examine the data in the Excel table. Source data the data that you use to create a PivotTable report can be worksheet data, an Excel table, an external database, or another PivotTable report. In this exercise, you will use data in a worksheet as the source data. When using worksheet data as your source data, the data should be in a tabular format data organized by rows and columns with column labels in the header row. When you create the PivotTable report, the column labels will be used as the field names for the PivotTable report. Within the data you want to analyze on your worksheet, be sure there are no blank rows or columns. Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: Skill 13 Page 1 of 7
2. Click any cell in the Excel table. On the Insert tab, in the Tables group, click the PivotTable button. Compare your screen with Figure 1. When you select a cell in an Excel table and insert a PivotTable report, the Select a table or range option button will be selected, and the Table/Range box displays the range of data from the Excel table identified as Table1. By default, the PivotTable report will be placed in a new worksheet. Create PivotTable dialog box New Worksheet option button Table name Figure 1 Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: Skill 13 Page 2 of 7
3. In the Create PivotTable dialog box, click OK to create a new worksheet with a PivotTable layout area and the PivotTable Field List pane displayed as shown in Figure 2. If the PivotTable Field List pane does not display, on the Options tab, in the Show group, click the Field List button. A cell within the layout area must be selected, or active, for the PivotTable Field List pane to display. Each column of the source data becomes a field. A field summarizes multiple rows of information from the source data. The column titles of the source data become the names of the PivotTable fields. The process for creating a PivotTable report involves selecting fields from the PivotTable Field List pane and moving them to the layout area. There are several techniques for moving the fields from the PivotTable Field List pane to the layout area. PivotTable Field List pane Field names from source data PivotTable layout area Figure 2 Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: Skill 13 Page 3 of 7
4. Consider the question How many of each plant are in the greenhouse? In the PivotTable Field List pane, select the Plants in Greenhouse check box, and then select the Plant check box. Verify that the total number of each plant displays in the PivotTable report as shown in Figure 3. The data in the Plant field, which is text, automatically displays as row headings on the left side of the PivotTable report and in the Row Labels area of the PivotTable Field List pane. The data in the Plants in Greenhouse field, which contains numbers, displays in the Values area of the PivotTable Field List pane. You can see that there are 264 Daylilies in the greenhouse. In cell A3, the text Row Labels displays to indicate that the data in this column is grouped. In cell B3, the column label displays the text Sum of to indicate that the SUM function is calculating the totals for each group of plants in column A. Row Labels Filter arrow Row Labels Sum of in column label Fields selected Figure 3 Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: Skill 13 Page 4 of 7
5. In cell A3, click the Row Labels filter arrow, and then click Sort Z to A. The plants are sorted in descending alphabetical order. Various filters and sorts can be applied in a PivotTable report in the same manner as in an Excel table. 6. Rename the sheet tab Total Plants and then make the Containers worksheet the active worksheet. 7. Using the techniques you just practiced, create a PivotTable report on a New Worksheet. Consider the question How many of each plant are in city buildings? On the PivotTable Field List pane, select the Plant check box, and then select the Plants in City Buildings check box, as shown in Figure 4. For each plant, the total number of plants in city buildings displays. Sum of Plants in City Buildings Fields selected Figure 4 Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: Skill 13 Page 5 of 7
8. In the PivotTable Field List pane, select the Container Size check box, as shown in Figure 5. Notice that under each plant, the total number of plants in each container size category displays; for example, for Amaryllis, there are 295 plants that are in city buildings that are in 20 inch containers. Plant Container size Figure 5 9. At the bottom of the PivotTable Field List pane, in the Row Labels area, click Container Size, and then on the displayed list, click Move Up to pivot the data in the PivotTable report. The data have been pivoted to list the plants by container size, and within each container size, the total number of plants displays; for example, 267 Petunias in 14-inch containers were used in city buildings. Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: SKILL 13 Page 6 of 7
10. In cell A4, click the 14 inch collapse button to collapse the category. Use the same technique to collapse the 8 inch category, and then compare your screen with Figure 6. By collapsing categories, you can focus on specific information. Here, only the details for the 20-inch containers display. 20 inch details display 14 inch details hidden Expand button Collapse button 8 inch details hidden Figure 6 11. Rename the sheet tab 20 inch Containers and then in cell B15, notice that a total of 493 Rosemary plants in 20-inch containers are in city buildings. Double-click cell B15, and then verify that a new worksheet has been created. In the new worksheet, an Excel table has been created that displays the details that generate the SUM value in cell B15 the cell you double-clicked. 12. Rename the new sheet tab Rosemary Detail Right-click the sheet tab, and then click Select All Sheets. Display the worksheet footers, click in the left footer, and then click the File Name button. Click in the right footer, and then click the Sheet Name button. 13. Return to Normal view, and then make cell A1 the active cell. Right-click the sheet tab, and then click Ungroup Sheets. 14. Save the workbook. Print or submit the file as directed by your instructor. Exit Excel. You have completed More Skills 13 Use Excel Functions and Tables Microsoft Excel Chapter 4 More Skills: SKILL 13 Page 7 of 7