IS348 An Introduction to PivotTables Using Excel 2007

Similar documents
Excel Using Pivot Tables

Excel Using Pivot Tables

Overview What is a PivotTable? Benefits

Produced by Flinders University Centre for Educational ICT. PivotTables Excel 2010

A Beginning Guide to the Excel 2007 Pivot Table

Microsoft Excel 2007 Consolidate Data & Analyze with Pivot Table Windows XP

Microsoft Excel 2013 Step-by-Step Exercises: PivotTables and PivotCharts: Exercise 1

CREATING EXCEL PIVOT TABLES AND PIVOT CHARTS FOR LIBRARY QUESTIONNAIRE RESULTS

How To Create A Powerpoint Intelligence Report In A Pivot Table In A Powerpoints.Com

MS Excel: Analysing Data using Pivot Tables

About PivotTable reports

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Analyzing Excel Data Using Pivot Tables

MICROSOFT EXCEL 2010 ANALYZE DATA

Computer Training Centre University College Cork. Excel 2013 Pivot Tables

Excel Pivot Tables. Blue Pecan Computer Training Ltd - Onsite Training Provider :: :: info@bluepecan.co.

Excel 2003 PivotTables Summarizing, Analyzing, and Presenting Your Data

Microsoft Excel 2010 Pivot Tables

Using Pivot Tables in Microsoft Excel 2003

Create a PivotTable or PivotChart report

Basic Pivot Tables. To begin your pivot table, choose Data, Pivot Table and Pivot Chart Report. 1 of 18

To complete this workbook, you will need the following file:

Microsoft Excel 2010 Part 3: Advanced Excel

Excel Database Management Microsoft Excel 2003

Pivot Tables & Pivot Charts

Microsoft Excel: Pivot Tables

Scott Harvey, Registrar Tri County Technical College. Using Excel Pivot Tables to Analyze Student Data

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

ITS Training Class Charts and PivotTables Using Excel 2007

How to Make the Most of Excel Spreadsheets

INTERMEDIATE Excel 2013

Introduction to Pivot Tables in Excel 2007

Microsoft Office Excel 2013

Excel PivotTables Basics and Beyond

EXCEL FINANCIAL USES

STATEMENT OF TRANSACTION REPORT ANALYSIS USING EXCEL

Excel 2010 Sorting and Filtering

Introduction to MS EXCEL 2007 Data entry & formatting Using formulas & functions Presenting data with charts Database features in Excel

Advanced Excel 10/20/2011 1

3 What s New in Excel 2007

IRA Pivot Table Review and Using Analyze to Modify Reports. For help,

Solving Using Excel. Introduction. Lists LEARNING OUTCOMES

Excel Working with Data Lists

Task Force on Technology / EXCEL

Using Excel for Business Analysis: A Guide to Financial Modelling Fundamentals

ACADEMIC TECHNOLOGY SUPPORT

Using Excel as a Management Reporting Tool with your Minotaur Data. Exercise 1 Customer Item Profitability Reporting Tool for Management

Using Excel for your assignments

Getting Started Guide SAGE ACCPAC INTELLIGENCE

Excel for Data Cleaning and Management

NAVIGATION TIPS. Special Tabs

Microsoft Excel 2010 Tutorial

Data Analysis with Microsoft Excel 2003

Working with Data in Microsoft Excel 2003

By: Peter K. Mulwa MSc (UoN), PGDE (KU), BSc (KU)

Pastel Evolution BIC. Getting Started Guide

Excel 2007 Basic knowledge

Advanced Microsoft Excel 2010

Migrating to Excel 2010 from Excel Excel - Microsoft Office 1 of 1

An Introduction to Excel s Pivot Table

Getting Started Guide

In-Depth Guide Advanced Spreadsheet Techniques

Microsoft Access 2010 handout

BUSINESS DATA ANALYSIS WITH PIVOTTABLES

In This Issue: Excel Sorting with Text and Numbers

How to Excel with CUFS Part 2 Excel 2010

Excel 2003 A Beginners Guide

Getting Started with Excel Table of Contents

Excel 2007 A Beginners Guide

Search help. More on Office.com: images templates. Here are some basic tasks that you can do in Microsoft Excel 2010.

Merging Labels, Letters, and Envelopes Word 2013

How to Use Excel for Law Firm Billing

WHAT S NEW IN MS EXCEL 2013

Sample- for evaluation purposes only! Advanced Excel. TeachUcomp, Inc. A Presentation of TeachUcomp Incorporated. Copyright TeachUcomp, Inc.

To reuse a template that you ve recently used, click Recent Templates, click the template that you want, and then click Create.

Excel Unit 4. Data files needed to complete these exercises will be found on the S: drive>410>student>computer Technology>Excel>Unit 4

Instructions for Creating an Outlook Distribution List from an Excel File

Computer Training Centre University College Cork. Excel 2013 Level 1

Microsoft Excel v5.0 Database Functions

Chapter 4 Displaying and Describing Categorical Data

Advanced Excel Charts : Tables : Pivots : Macros

Use Find & Replace Commands under Home tab to search and replace data.

MICROSOFT ACCESS 2003 TUTORIAL

Excel 2003: Ringtones Task

Kingsoft Spreadsheet 2012

Q&As: Microsoft Excel 2013: Chapter 2

warpct.com Working with MS Excel 2003 Workbook courseware by WARP! Computer Training

Enhance The Excel Experience Part I

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Excel What you will do:

Microsoft Excel 2013 Sorting, Subtotals and Outlines (Level 3)

Sage Intelligence Report Designer Add-In

A Quick Tour of F9 1

Introduction to Pivot Tables in Excel 2003

Introduction to Microsoft Access 2003

A simple three dimensional Column bar chart can be produced from the following example spreadsheet. Note that cell A1 is left blank.

How to Use a Data Spreadsheet: Excel

Data exploration with Microsoft Excel: univariate analysis

Using PivotTables and PivotCharts

Excel 2010: Create your first spreadsheet

Transcription:

IS348 An Introduction to PivotTables Using Excel 2007 January 2012 Information Technology Skills Series

These Session Notes are available in alternative formats on request. For further information please contact Chris Horton in Computer Centre Room 108 (01784 41 4105, c.horton@rhul.ac.uk) Royal Holloway and Bedford New College 2011. All Rights Reserved

11 th January 20112 IS348 Introduction to Excel 2007 s PivotTables Contents The file you will require for this session is:... 1 Outline of the session... 1 What is a PivotTable?... 1 Starting Excel... 1 Opening the Session s Workbook... 1 Saving the Workbook... 2 Use of Lists... 2 Viewing the List... 2 Creating a PivotTable... 3 Changing the PivotTable View... 3 Selecting the Headings (Fields)... 4 Improving the PivotTable s Display... 4 Renaming a Worksheet... 5 Changing a Field s Display... 5 Adding Further Information... 5 Modifying the PivotTable... 6 Changing the PivotTable s Column Headings... 7 Changing PivotTable Updates During Changes... 7 Creating a New PivotTable... 7 Adding to the PivotTable... 8 Improving the PivotTable s Display... 9 Modifying the PivotTable... 9 Hiding and Displaying Subtotals... 11 Renaming the Worksheet... 11 Updating the PivotTable Data... 12 Hiding and Displaying Fields... 12 Obtaining More Detail from the PivotTable... 14 Using the Headings Drop-Down Lists... 14 Formatting a PivotTable... 15 Using the Column Option... 16 Summarising More Complicated Data... 19 Creating PivotCharts... 24 Consolidation Exercises... 25 Conclusion... 26 Accessing the IT Training Exercise Files and (Y:) drive from your own PC/Laptop... 27

IS348 Introduction to Excel 2007 s PivotTables The file you will require for this session is: File Name Location New IS348 PivotTables.xlsx R:\IT Training\Advanced\New IS348 PivotTables.xlsx Outline of the session 1. In this session we will examine the basics of producing and using Excel s PivotTables feature. You will learn how to create a PivotTable, and how to modify it so that it better suits your needs. You will also learn how to change its appearance by, for example, applying a sort order, and removing/adding subtotals. You will also learn how to produce a chart from the PivotTable using the PivotChart facility. What is a PivotTable? 2. In its simplest form, a PivotTable is a summary of an Excel list. However, in reality it is a collection of analytical tools that lets you quickly create summary information with the ability to sort, filter, group and rearrange data to suit your particular need. Although you can create a PivotTable that does not summarise numerical information, most PivotTables are focussed on numbers. However, it is perfectly feasible, for example, to create PivotTables that merely provide counts of entries. What you can do with a PivotTable: Quickly summarise data from a worksheet Calculate totals, averages, counts, etc. based on any numeric field(s) in your table Generate charts from your PivotTables The advantages of using a PivotTable: PivotTables are interactive, that is, you can easily rearrange them by moving, adding, or deleting fields PivotTables are dynamic, which means that results are automatically recalculated whenever fields are added or removed, or categories hidden/displayed PivotTables are easy to update if the original worksheet data is changed Starting Excel 3. We will begin by opening Excel. To do this from an Open-Access PC: a. Click on the Start button to open the Start Menu. b. Click on. Excel 2007 will now open. Opening the Session s Workbook 4. For today s session we are going to use a workbook called New IS348 PivotTables.xlsx. To open this file: a. Click on the Office button at the top left-hand corner of the window. b. Click on Open to display the Open dialogue box. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 1

c. If necessary scroll down in the left-hand panel to display the list of available drives. d. Click on the (R:) drive in the list to select the drive and display its contents in the right-hand panel. e. In the right-hand panel locate the IT Training folder, and then double-click on it to display the files and folders it contains. f. The Workbook you need is in the Advanced subfolder, so locate this folder in the right-hand panel and then double-click on it to display its contents. g. In the right-hand panel locate New IS348 PivotTables.xlsx and then select it by clicking on it. h. Click on Open to open the workbook. Saving the Workbook 5. We will begin by saving this file to the IT Skills folder on our (Y:) drive. To do this: a. Click on the Office button at the top left-hand corner of the window. b. Click on Save As to display the Save As dialogue box. c. If necessary scroll down the left-hand panel to display the list of available drives. d. Click on the (Y:) drive in the list to select the drive and display its contents in the right-hand panel. e. In the right-hand panel locate the IT Skills folder, and then double-click on it to select it. f. Ensure that the filename in the File name: panel is: New IS348 PivotTables.xlsx g. Click on Save to save the file and return to the workbook window. Use of Lists 6. PivotTables are based on a list of data in a worksheet. Although you can create a list and enter data into it in much the same way as you do any Excel worksheet, it is important to adhere to the following rules: The first row of the list must always contain a descriptive heading for each column The list must not contain any totally empty rows or columns within the list. This is because Excel determines the boundary of a list by an empty row/column The list should be kept self-contained, preferably by placing it on a separate worksheet. If this is not possible ensure that there is an empty column to the right (and left if applicable) of the list and an empty row below (and above if applicable) the list Viewing the List 7. Before we begin to create the PivotTables it is useful to view the data that we are going to use. To do this: a. Ensure that the Sales Data tab is selected. b. View the data, noting the name of each column and the type of data that each contains. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 2

Creating a PivotTable 8. We will now create a PivotTable based on this data. To do this: a. Click anywhere within the list so that Excel is aware of the data that we wish to use. b. Click on the Insert tab to the left of the Ribbon. c. Click on the PivotTable button (not the drop-down arrow) in the Tables group at the left of the Ribbon. d. The Create PivotTable dialogue box displays. e. In the Table/Range: panel ensure that the range selected is: Sales Data!$A$1:$E$800 f. Under the Choose where you want the PivotTable report to be placed heading ensure that the New Worksheet option button displays a check mark, as we want the new PivotTable to display on a new worksheet. g. Click on OK to close the Create PivotTable dialogue box. h. A new worksheet displays with the PivotTable Field List on the right and an outline structure for the PivotTable on the left. Changing the PivotTable View 9. Excel 2007 offers two different views for creating PivotTables: The Classic View which is the one used in Excel XP/2003 The Excel 2007 View which is the only view available on the later Excel 2010, and optional on Excel 2007 Classic View Excel 2007 View 10. To enable an easier progression to Excel 2010, these Session Notes use only the later view. Therefore, if the Classic View displays it can be change to the Excel 2007 view as follows: a. Ensure the worksheet is displaying the PivotTable Field List. b. Ensure that the Options tab towards the right of the Ribbon is selected. c. Click on Options in the PivotTable group at the left of the Ribbon to display the PivotTable Options dialogue box. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 3

d. Click on the Display tab. e. Click on the Classic PivotTable layout (enables dragging of fields in the grid) tick box so that it does not display a tick mark. f. Click on OK to close the PivotTable Options dialogue box. Selecting the Headings (Fields) 11. The PivotTable is laid out using four distinct areas: Row Labels, Values, Column Labels and Report Filter. The way in which these work is as follows: The Row Labels are fields from the underlying source data that are assigned a row orientation in a PivotTable The Values Fields are fields that contains data to be summarized Note: Numerical values will by default be summed (added up) Non-numerical values will by default be counted The Column Labels are fields that will be assigned a column orientation in a PivotTable The Report Filter is a field that is assigned to a page, or filter, orientation. Therefore, a Report Filter produces a three-dimensional report that consists of multiple pages each of which contains a subset of the data that is summarised in the PivotTable 12. We are going to begin by producing a PivotTable that displays the Order amount for each Salesperson. As a result, the headings (fields) that we are interested in using are: Salesperson Order Amount 13. In this case we need to sum the order amount for each salesperson, therefore the Salesperson field needs to be placed in the Row area and the Order Amount field in the Values area. 14. To insert these headings (fields) into the new PivotTable: a. In the PivotTable Field List on the right of the window locate the Salesperson field under the Choose Fields to add to report: heading. b. Then drag the field to the Row Labels panel at the bottom left of the dialogue box. c. Now drag the Order Amount field under the Choose Fields to add to report: heading into the Values panel at the bottom right of the dialogue box. d. You should notice that as you add these field to the relevant panels the PivotTable on the left updates to show the changes you have made. e. View the data displayed in the PivotTable, you should notice that you can easily see how much each salesperson has generated. Improving the PivotTable s Display 15. If the PivotTable does not display as two distinct columns you can change it so that it does. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Design tab at the right of the Ribbon. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 4

c. Click on Report Layout in the Layout group at the left of the Ribbon. d. Select Show in Outline Form (or, if you prefer, Show in Tabular Form). Renaming a Worksheet 16. You should notice that the PivotTable has been created on a new worksheet, which prevents the underlying data from being changed. 17. It is probably worth renaming this worksheet so that it has a more meaningful name. This is especially useful when you need to produce a number of different worksheets, possibly containing different PivotTables. To do this: a. Double-click on the PivotTable s tab at the bottom of the window (probably named Sheet1). b. Type the new name for the worksheet; In this case call it Sales PivotTable c. To accept the change press [Enter ]. d. Now save the Workbook again by clicking on the Save button. Changing a Field s Display 18. We currently have the total value for each Salespersons Order Amount. However, we may want to find out how many orders they processed in order to achieve this figure. 19. To do this we need to change the arithmetical operation from Sum to Count. To do this: a. Click anywhere within the PivotTable to ensure that it is selected. b. Click on Sum of Order Amount in the Values panel at the bottom of the PivotTable Field List. c. Click on Value Field Settings to display the Value Field Settings dialogue box. d. Ensure that the Custom Name: panel states Sum of Order Amount as it is this field that you want to change to Count. e. In the Summarize value field by panel click on Count to select it. f. Click on OK to close the Value Field Settings dialogue box and apply the change. Adding Further Information 20. If necessary you can add further fields to the PivotTable to get exactly the information you require. For example we can display both the count and sum of the Order Amounts so that we can see the amount each salesperson has taken along with number of orders processed to achieve this. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 5

21. To do this: a. In the PivotTable Field List on the right of the window locate the Order Amount field under the Choose Fields to add to report: heading. b. Then drag the field to the Values panel so it is just below the existing Count of Order Amounts field. c. The PivotTable updates to show both Count of Order Amounts and Sum of Order Amounts. d. Save the Workbook again by clicking on the Save button. Modifying the PivotTable 22. We will now modify the PivotTable by including a Report Filter to display the Order amount for each Salesperson in each country. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. In the PivotTable Field List on the right of the window locate the Country field under the Choose Fields to add to report: heading. c. Then drag the field to the Report Filter panel towards the bottom left of the dialogue box. d. You will notice that the PivotTable has been modified with the Country field being displayed at the very top (in cell A1). e. It appears that apart from the inclusion of the Country field, the PivotTable has not changed in the way it is displaying the data. f. However if you now click on the down-arrow to the right of the Country field you will see that you have the options (All), UK and USA. g. Now filter the display to show the Order Amounts for only each UK Salesperson. To do this: (1) Click on the down-arrow to the right of the Country field to display the options available. (2) Select the UK option by clicking on it. (3) Click on OK to update the PivotTable and display just the UK Salespersons Order Amounts. h. Now redisplay All the Salespersons Order Amounts. To do this: (1) Click on the down-arrow (which now displays with a filter icon) to the right of the Country field to display the options available. (2) Select the (All) option by clicking on it. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 6

(3) Click on OK to update the PivotTable and display all the Salespersons Order Amounts. Changing the PivotTable s Column Headings 23. The column headings within the PivotTable can be easily changed by clicking on the heading to be changed and then making the edit in the Formula Bar (immediately below the Ribbon). Note: The heading cannot be changed to any that are used in the underlying worksheet, for example the Row Labels heading cannot be changed to (in this case) Salesperson. Changing PivotTable Updates During Changes 24. The PivotTable Field List enables you to select whether a PivotTable is automatically or manually updated, for example when a field is added or removed. 25. Changing to the manual option may, for example, be necessary when there are a large number of fields within the PivotTable and so becomes very slow to refresh after any changes. 26. By default the option is set to automatically update to reflect any changes. However, if you need to change to manual update: a. Click within the Defer Layout Updates option box at the bottom of the PivotTable Field List so that it displays a tick mark. b. To update the PivotTable after adding or removing fields (headings) within the PivotTable Field List click on the Update button at its bottom right- hand corner. c. In this case automatic updates do not need to be disabled, so ensure that the Defer Layout Updates option box does not display a tick mark. Creating a New PivotTable 27. We will now create another PivotTable, this one based on a set of data relating to student accommodation. To do this: a. Click on the Accommodation Data tab to display a worksheet dealing with students accommodation. b. View the data in the list, noting that it contains a number of students (approximately 24), the College accommodation they are renting and the details of their payments for the last 3 terms. You should also notice that each term is in its own effective section, thus the student data is replicated 3 times, once for each term. 28. When viewing this data it is useful to consider the questions we are likely to ask of it. Possible questions may be: What is the total amount paid to date by each student What was the date paid for each installment by each student Which accommodation is each student renting What was the date paid for each installment by each student and for which accommodation Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 7

29. We will now create a PivotTable based on this data in order to answer some of these questions. To do this: a. Click anywhere within the list so that Excel is aware of the data we wish to use. b. Click on the Insert tab to the left of the Ribbon. c. Click on the PivotTable button (not the drop-down arrow) in the Tables group at the left of the Ribbon. d. The Create PivotTable dialogue box displays. e. As we previously clicked within our list of data, Excel should have identified the correct Table/Range: of Accommodation Data!$A$1:$E$73. f. We will create the PivotTable on a new worksheet, so under the Choose where you want the PivotTable report to be placed heading ensure that the New Worksheet option button displays a check mark. g. Click on OK to close the Create PivotTable dialogue box. 30. We are going to first produce a PivotTable that displays the student s name and amounts paid to date. 31. Therefore the headings (fields) that we are interested in using are: NAME AM_PAID (Amount Paid) 32. To insert these headings (fields) into the new PivotTable: a. In the PivotTable Field List on the right of the window locate the NAME field under the Choose Fields to add to report: heading. b. Then drag the field to the Row Labels panel at the bottom left of the dialogue box. c. Now drag the AM_PAID field under the Choose Fields to add to report: heading into the Values panel at the bottom right of the dialogue box. d. You should notice that as you add these field to the relevant panels the PivotTable on the left updates to show the changes you have made. e. Save the Workbook again by clicking on the save button. Adding to the PivotTable 33. The PivotTable we have just produced gives a very basic display of the amount paid by each student. However it does not answer such questions as did the student pay the whole cost in one go, or over the three terms. In order to answer this question we need to modify the PivotTable. To do this: a. Click anywhere within the PivotTable to ensure it is selected. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 8

b. We need to include the DATE_PAID option in the PivotTable. So to do this: (1) In the PivotTable Field List on the right of the window locate the DATE_PAID field under the Choose Fields to add to report: heading. (2) Then drag the field to below the NAME field in the Row Labels panel at the bottom left of the dialogue box. c. View the data displayed in the PivotTable, you should notice that the payment date for each student is now included, thus showing how and when they paid. Improving the PivotTable s Display 34. If the PivotTable does not display as three distinct columns you can change it so that it does. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Design tab at the right of the Ribbon. c. Click on Report Layout in the Layout group at the left of the Ribbon. d. Select Show in Outline Form (or, if you prefer, Show in Tabular Form). Modifying the PivotTable 35. That display is clearly useful, however it gives no detail about the accommodation each student is renting, and so we need to include the ACCOMMODATION field (heading) in the PivotTable. 36. To address this we will try adding the Accommodation field to the Report Filter. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. In the PivotTable Field List on the right of the window locate the ACCOMMODATION field under the Choose Fields to add to report: heading. c. Then drag the field to the Report Filter panel towards the bottom left of the dialogue box. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 9

37. We will now Filter the PivotTable so that it displays all the students residing in Founders. To do this: a. Click on the down-arrow to the right of the ACCOMMODATION field in cell A1 to display the options available. b. Select the Founders option by clicking on it. c. Click on OK to update the PivotTable and display all the students residing in Founders. d. If we wanted to, we could repeat this process to select another accommodation location from the drop-down list and view the students residing there. 38. Although the current format may be suitable for some situations, it may be easier to view the accommodation location alongside each payment, which involves adding the ACCOMMODATION field to the Row Labels panel. 39. Before we can do this we may need to make the Row Labels panel larger, so to do this: a. Point to the separator bar above the Drag fields between areas below: heading in the PivotTable Field List so that the cursor changes to a doubleheaded arrow. b. Drag the separator bar up so the field listing area gets smaller and the four panels below becomes larger. 40. We can now add the ACCOMMODATION field to the Row Labels panel. To do this: a. In the PivotTable Field List on the right of the window locate the ACCOMMODATION field in the Report Filter panel towards the bottom left of the dialogue box. b. Then drag the field to below the DATE_PAID field at the bottom of the Row Labels panel at the bottom left of the dialogue box. c. View the effects on the PivotTable s display. Although this may be considered more useful for some needs than the last version we produced, it is not very clearly laid out, with at least two potential areas that could be improved: (1) The ACCOMMODATION data may appear better to the left of the DATE_PAID field (2) The Date subtotal is unnecessary in this situation 41. We will now incorporate these improvements into our PivotTable. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. We want the DATE_PAID field to appear to the right of the ACCOMMODATION field. c. Therefore, in the Row Labels panel at the bottom left of the dialogue box, simply click and drag the DATE_PAID field so that it is below the ACCOMMODATION field. OR Click on the down-arrow to the right of the DATE_PAID field in the Row Labels panel and select Move Down from the menu that displays. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 10

Note: this illustrates how the order of the fields in the relevant areas indicates the position that they will appear in the PivotTable. d. Save the Workbook again by clicking on the save button. Hiding and Displaying Subtotals 42. You should notice that the display is much clearer, and that the Date subtotal that we identified earlier as being unnecessary has been removed as part of reorganising the Row Labels panel. 43. This thus highlights that as part of its data analysis, Excel attempts to display the required data in the best way it can as well as adding what may be suitable analytical features such as subtotals, where it thinks appropriate. 44. However, subtotals ARE displaying for each ACCOMMODATION entry, which would probably be better removed. Therefore, to remove these subtotals: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Design tab at the right of the Ribbon. c. Click on Subtotals in the Layout group at the left of the Ribbon. d. Click on Do Not Show Subtotals. 45. You should notice that the unwanted subtotals have now been removed. However, the total paid by each student has also been removed, which probably reduces the PivotTable s usefulness. 46. To reinstate this total we need to change for the Field Settings for the Name field. To do this: a. Click on the Name field in the Row Labels panel at the bottom left of the PivotTable Field List. b. Select Field Settings to display the Field Setting dialogue box. c. In the Subtotals panel click on the Automatic option button so that it contains a check mark. d. Click on OK to close the Field Settings dialogue box. You should notice that the total paid is now displayed alongside each students name. e. Save the Workbook again by clicking on the Save button. Renaming the Worksheet 47. As the PivotTable has been created on its own worksheet it is probably worth renaming it to have a more meaningful name. To do this: a. Double-click on the PivotTable s tab at the bottom of the window (probably named Sheet2). b. Now type the new name for the worksheet, which is: Accommodation PivotTable c. To accept the name change press [Enter ]. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 11

d. Now save the Workbook again by clicking on the Save button. Updating the PivotTable Data 48. Unlike charts, PivotTables are not automatically updated when the underlying data is changed. 49. You may have noticed that the 29-09-07 entry for COSTELLO,RACHEL shows that she is located in Williamson. This (for the benefit of today s session) is incorrect, as she is spending the entire academic year in Butler, as the other two terms correctly show. 50. We will now investigate refreshing the data by correcting this inaccuracy. To do this: a. Return to the Accommodation Data worksheet by clicking on its tab. b. Locate cell C8, the cell containing Rachel s accommodation location for the first term, and overtype Williamson with the correct location, which is: Butler c. Save the Workbook again by clicking on the Save button. d. Return to the PivotTable by clicking on the Accommodation PivotTable tab. e. You should notice that the PivotTable has not been updated to reflect the change you have just made. f. To refresh the data to show the change: (1) Click anywhere within the PivotTable to ensure it is selected. (2) Ensure that the Options tab at the right of the Ribbon is selected. (3) Now click on the Refresh button in the Data group at the centre of the Ribbon. (4) You should see that the data in the PivotTable is now updated to show that Rachel is now located in Butler for the entire year. Note: The data can also be refreshed in the following ways: (a) By pressing [Alt]+[F5]. (b) By right-clicking on the PivotTable and selecting Refresh. Hiding and Displaying Fields 51. There may be occasions when your PivotTable contains data that you do not want displayed but you do not wish to modify its actual structure. To deal with this situation, Excel enables selected areas of a PivotTable to be hidden. We will now examine some of the areas you can affect using this feature. 52. We will begin by hiding some of the payment details relating to COSTELLO,RACHEL, the first entry in the PivotTable. 53. To do this we will use the Expand and Collapse buttons that are normally located to the left of the field entry, for example to the left of the Butler accommodation entry. 54. If these do not display, you will need to turn them on. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Options tab to the right of the Ribbon. c. Click on the Expand/Collapse button within the Show/Hide group at the right of the Ribbon. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 12

55. To hide the payment details relating to COSTELLO,RACHEL, the first entry in the PivotTable: a. Click on the Collapse button to the left of the Butler location for COSTELLO,RACHEL. b. View the results, you should notice that the payment dates have been hidden for all occurrences where the Accommodation is Butler. Additionally, the Totals for these rows display a sum of the amount paid, rather than the individual amounts that were previously displayed. c. To redisplay the information relating to the Butler accommodation entries click on the Expand button to the left of the Butler location for COSTELLO,RACHEL. You should see that the payment dates and individual amounts paid have been restored. d. You can also hide more detail if you wish to by right-clicking on a field. To demonstrate this we will collapse the payment dates and amounts for all accommodation locations. e. To do this: (1) Right-click on any accommodation entry, for example the Butler location for COSTELLO,RACHEL. (2) From the short-cut menu that displays select Expand/Collapse. (3) From the further sub-menu that displays select Collapse Entire Field. (4) You should notice that all accommodation locations have been affected by this change, rather then only Butler as occurred previously. f. Using the same method you can also expand the display. We will now do this to return the PivotTable to how it appeared before we changed it. To do this: (1) Right-click on any accommodation entry, for example the Butler location for COSTELLO,RACHEL. (2) From the short-cut menu that displays select Expand/Collapse. (3) From the further sub-menu that displays select Expand Entire Field. (4) You should notice that payment dates and amounts are now fully displayed. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 13

Obtaining More Detail from the PivotTable 56. When working with a PivotTable, it is frequently possible to obtain more detail than is currently displayed, a term normally referred to as drilling down through the data. In reality, what Excel is actually doing is to redisplay the data from the underlying list in a more user-friendly layout. 57. We will now examine this using the current PivotTable. a. Double-click on the first Amount Paid (1537.26) figure under the Sum of Am_Paid heading for the student COSTELLO,RACHEL. b. A new worksheet is displayed containing all the relevant data for this student from the underlying list: c. Return to your PivotTable by clicking on the Accommodation PivotTable tab. 58. By clicking on a single payment in this way we obtained the full details relating to that single payment. We can, however, obtain even more detail by being more selective of the data we select. 59. To demonstrate this we will now obtain details of all the payments this student has made. To do this: a. Double-click on the total Amount Paid (3833.89) figure under the Sum of Am_Paid heading for the student COSTELLO,RACHEL. b. A new worksheet is displayed containing all the relevant data for this student from the underlying list: c. From this worksheet we can obtain all the available data relating to this student s payments. Although the data is from the underlying list, it should be remembered that the list is in 3 distinct sections, i.e. a section for each term s payment. Therefore this new worksheet offers a much easier format to use. d. Return to your PivotTable by clicking on the Accommodation PivotTable tab. Using the Headings Drop-Down Lists 60. Depending on the heading, there are two types of list that can be obtained from the drop-down arrow that is part of most PivotTable headings: One format generally enables only one item to be selected from the list, although it may include an option to select multiple items. The other format enables as many, or as few, items as required to be selected. 61. To enable us to examine this we will move the Accommodation field back into the Report Filter panel. To do this: a. Locate the ACCOMMODATION field in the Row Labels panel at the bottom left of the PivotTable Field List. b. Then drag the field into the Report Filter panel towards the bottom left of the dialogue box. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 14

62. To begin examining the different drop-down lists: a. Click on the down-arrow to the right of the ACCOMMODATION field in cell A1 to display the options available. b. Click on any of the options. You should notice that you can select only one option at a time. c. Therefore this type of list generally allows the selection of only one (or all) item(s). d. However, to overcome this limitation, Excel 2007 frequently includes the option to select multiple items. To demonstrate this: (1) Click within the Select Multiple Items option button so that it display a tick mark. The list of options now includes option buttons for you to enter tick marks. (2) To initially remove all tick marks click on All. (3) In this case we will display details for Kingswood and Reid Hall, therefore enter a tick mark alongside the Kingswood and Reid Hall options. (4) Click on OK to close the dialogue box and display the details for the students residing in these locations. e. Now make the PivotTable display all locations. To do this: (1) Click on the down-arrow (which now displays with a filter icon) to the right of the ACCOMMODATION field again to display the options available. (2) Click within the Select Multiple Items option button to remove the tick mark. The option panels alongside the list items are also removed. (3) We want to display all locations, so click on All. (4) Click on OK to update the PivotTable and display all the accommodation options. 63. We will now examine the other type of list where more than one item can be easily selected/deselected. To do this: a. Click on the down-arrow to the right of the DATE_PAID heading. b. You should notice that this list contains an entry for every item, in this case date, that is contained within the underlying data. The tick box to the left of each item designates whether the item is to be displayed, i.e. if it displays a tick mark the item will be displayed. To hide an item click on the tick mark to remove it. c. Click on the tick box for the third date down (29/09/07) to remove the tick mark. d. Now click on OK to accept your change. e. You will notice that all occurrences of the date 29/09/07 have been hidden, including the one for the first student, COSTELLO,RACHEL. This type of list thus enables you to include only the items that you want, from just one item right up to all of them. Formatting a PivotTable 64. We will now consider several ways in which we can modify the appearance of our PivotTable. The first area we will examine is the sort order of the data. a. The students Name field is currently sorted into an ascending order. To change this to a descending order: Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 15

(1) Click on the down-arrow to the right of the NAME field heading. (2) From the menu that displays select Sort Z to A. (3) The PivotTable will now display with the students name in a Z to A order. 65. Changing the sort order of one field does not exclude you doing so for other fields (headings), so we will now change the order of the DATE_PAID field. To do this: a. Click on the down-arrow (which now displays with a filter icon) to the right of the DATE_PAID field heading. b. From the menu that displays select Sort Newest to Oldest. c. You will see that the later dates now appear first for each student. d. Save the Workbook again by clicking on the save button. 66. Another way in which you may need to format the data is so that it suitably displays money. This can be done easily by using Excel s Currency option. To do this: a. Right-click on the Sum of AM_PAID field heading at the top left of the PivotTable. b. Select Number Format from the menu that displays to display the Format Cells dialogue box. c. We need to apply a Currency format to this data, so in the Category: panel of the Format Cells dialogue box, select the Currency option. d. You should also ensure that the Decimal places: text box displays 2 and the Symbol: text box displays a pound sign ( ). Note: This dialogue box also enables you to change the number of decimal places that a normal number displays. For example if you are performing a Count on some data you would want it to show no decimal places, and so you would select Number from the Category: panel and change the Decimal places: text box to display a zero (0). e. When you have completed applying the format that you want, click on OK to close the Format Cells dialogue box and apply the change. f. Save the Workbook again by clicking on the Save button. Using the Column Option 67. So far we have only made use of the Row Labels, Values, and Report Filter options within our PivotTables. 68. We will now extend this by creating another PivotTable in order to examine the use of the Column option. 69. To do this: a. Return to the Accommodation Data worksheet by clicking on its tab, and then click anywhere within the list so that Excel is aware of the data we wish to use. b. Click on the Insert tab to the left of the Ribbon. c. Click on the PivotTable button (not the drop-down arrow) in the Tables group at the left of the Ribbon. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 16

d. The Create PivotTable dialogue box displays. e. Ensure that the Table/Range: panel contains the range Accommodation Data!$A$1:$E$73. f. We will create the new PivotTable on a new worksheet, so under the Choose where you want the PivotTable report to be placed heading ensure that the New Worksheet option button displays a check mark. g. Click on OK to close the Create PivotTable dialogue box. 70. We are going to recreate the PivotTable that displays the student s name and amount paid, along with the Accommodation location. Therefore to do this: a. In the PivotTable Field List on the right of the window locate the NAME field under the Choose Fields to add to report: heading. b. Then drag the field to the Row Labels panel at the bottom left of the dialogue box. c. Now drag the AM_PAID field under the Choose Fields to add to report: heading to the Values panel at the bottom right of the dialogue box. d. Finally drag the ACCOMMODATION field under the Choose Fields to add to report: heading into the Column Labels panel towards the bottom right of the dialogue box. e. Save the Workbook again by clicking on the save button. f. If you now view the PivotTable you will probably find that the PivotTable Field List gets in the way. g. To hide this click on its Close button at the top right-hand corner of the dialogue box. h. View the PivotTable, noting the general layout and that there are totals for both rows and columns. The row gives the total amount paid by each student. The columns displays the total amount received for each Accommodation location. i. This layout would therefore be very useful if you wanted to display each student s location AND the total amount generated by each location. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 17

71. However, we can further improve this layout by adding the DATE_PAID field, which we will now do: a. We need to first display the PivotTable Field List. To do this: (1) Click anywhere within the PivotTable to ensure it is selected. (2) Ensure that the Options tab at the right of the Ribbon is selected. (3) Now click on Field List that is in the Show/Hide group at the right of the Ribbon. b. In the PivotTable Field List on the right of the window locate the DATE_PAID field under the Choose Fields to add to report: heading. c. Then drag the field so that it is above the NAME field in the Row Labels panel at the bottom left of the dialogue box. d. View the layout. Notice that this new layout groups the payment by date, so displaying all students who paid on each date. 72. If the PivotTable does not display with the date and student name as distinct columns you can change it so that it does. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Design tab at the right of the Ribbon. c. Click on Report Layout in the Layout group at the left of the Ribbon. d. Select Show in Outline Form (or, if you prefer, Show in Tabular Form). 73. We will now modify the layout by repositioning the DATE_PAID field. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click and drag the DATE_PAID field so that it is below the Name field in the Row Labels panel at the bottom left of the PivotTable Field List. c. View the layout. Notice that the date each payment is made is grouped together for each student thus giving a similar display to that we were working with earlier. However this layout also gives the total revenue generated by each accommodation location. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 18

d. That completes the work on this PivotTable, so save the Workbook again by clicking on the Save button. Summarising More Complicated Data 74. The data that you have been using enabled us to produce a PivotTable to achieve the desired results very easily. However, some data does not lend itself to the production of a PivotTable quite so easily. We are now going to look at the Questionnaire Results data which although enabling us to produce a PivotTable to get the results you need, is not as simple as it may first appear, and hence you will need to produce several PivotTables in order to achieve the results you require. 75. In this example, you have a worksheet containing the results from a questionnaire which was completed by 350 people. To help aid you with this scenario you can view a sample of the questionnaire which produced the resulting data on the next page. 76. The issues to note are: The questionnaire has a total of 4 questions, and each question has 5 possible responses. When the questionnaire is completed the results are sent to the owner in the form of: 1 = the 1 st answer option, 2 = the 2 nd answer option and so on. As a result we have a worksheet which displays a numerical response in relation to each question answered. 77. The data you want to summarise is how many people selected each answer option for each of the four questions. You also want to find out what percentage of people selected each answer option. To obtain this information you need to create a PivotTable for each question rather than one PivotTable for all the data. 78. Start by creating a PivotTable to count how many people selected each answer for Question 1 (Quest 1). To do this: a. Display the worksheet Questionnaire Results by clicking on its tab. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 19

b. Click anywhere within the list of data so that Excel is aware of the data we wish to use. c. Click on the Insert tab to the left of the Ribbon. d. Click on the PivotTable button (not the drop-down arrow) in the Tables group at the left of the Ribbon. e. The Create PivotTable dialogue box displays. f. Ensure that the Table/Range: panel contains the range Questionnaire Results!$A$1:$E$351. g. We will create the new PivotTable on a new worksheet, so under the Choose where you want the PivotTable report to be placed heading ensure that the New Worksheet option button displays a check mark. h. Click on OK to close the Create PivotTable dialogue box. 79. We want to calculate the amount of times each answer option was selected in Quest 1. The only field we need to calculate this is the Quest 1 field, which we will use in both the Row Labels and Values panels. Therefore to do this: a. In the PivotTable Field List on the right of the window locate the Quest 1 field under the Choose Fields to add to report: heading. b. Then drag the field to the Row Labels panel at the bottom left of the dialogue box. c. Now drag the Quest 1 field under the Choose Fields to add to report: heading into the Values panel at the bottom right of the dialogue box. d. Save the Workbook again by clicking on the save button. e. View the new PivotTable. On the left-hand side is the answer options available (1, 2, 3, 4 and 5) and on the right-hand side is the total number of respondents for each option. 80. If the PivotTable does not display with the question number and result as distinct columns you can change it so that it does. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. Click on the Design tab at the right of the Ribbon. c. Click on Report Layout in the Layout group at the left of the Ribbon. d. Select Show in Outline Form (or, if you prefer, Show in Tabular Form). 81. You should see that the PivotTable has defaulted to summarizing the data. We need to Count the responses not Sum them, so to change the Summarize option: a. Click on Sum of Quest 1 in the Values panel at the bottom right of the Pivot Table Field List. IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 20

b. Click on Value Field Settings to display the Value Field Settings dialogue box. c. Ensure that the Custom Name: panel states Sum of Quest 1 d. Also ensure that the Summarize by tab is selected. e. Select Count from the Summarize value field by: panel. f. Click on OK to close the Value Field Settings dialogue box and apply the change. g. Save the Workbook again by clicking on the Save button. 82. We also want to find out the percentage of people who selected each answer in Quest 1 in relation to the total number of respondents. 83. To achieve this we will add another copy of the Quest 1 field and then modify it to display as a percentage of the total amount. 84. To do this: a. Click anywhere within the PivotTable to ensure it is selected. b. In the PivotTable Field List on the right of the window locate the Quest 1 field under the Choose Fields to add to report: heading. c. Then drag it to the Values panel at the bottom right of the dialogue box so it is below the Count of Quest 1 entry. d. We now need to change this field so that it calculates the percentage for each answer selected in relation to the total number of respondents. However, before doing that we need to change the summerize option to Count, so to do this: (1) Click on Sum of Quest 1 below the Count of Quest 1 entry in the Values panel at the bottom right of the Pivot Table Field List. (2) Click on Value Field Settings to display the Value Field Settings dialogue box. (3) Ensure that the Custom Name: panel states Sum of Quest 1 (4) Also ensure that the Summarize by tab is selected. (5) Select Count from the Summarize value field by: panel. e. We can now change this field so that it calculates the percentage for each answer selected in relation to the total number of respondents. To do this: (1) Click on the Show values as tab. (2) Click on the down-arrow to the right of the Show Values as panel to display a list of options. (3) Scroll down the list and select the % of column option. (4) Click on OK to close the Value Field Settings dialogue box. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 21

85. View the result of the modification. From this we can now see that for Question 1, 25 people selected answer 1 which is 7.14% of the total respondents. 86. We have now completed our first PivotTable for the Questionnaire Results worksheet. Before we continue to create the second PivotTable we will name this worksheet so that it has a more relevant name. To do this: a. Double-click on the PivotTable s tab at the bottom of the window (probably named Sheet5). The tab s name will become highlighted to indicate that it can be changed. b. Now type the new name for the worksheet; in this case call it: Questionnaire PT c. To accept the name change press [Enter ]. d. Now save the Workbook again by clicking on the Save button. 87. We will now create a second PivotTable to count how many people selected each answer in Quest 2 and also what percentage selected each answer in relation to the total number of respondents. To do this: a. Display the Questionnaire Results worksheet by clicking on its tab. b. Click anywhere within the list of data so that Excel is aware of the data that we wish to use. c. Click on the Insert tab to the left of the Ribbon. d. Click on the PivotTable button (not the drop-down arrow) in the Tables group at the left of the Ribbon. e. The Create PivotTable dialogue box displays. f. Ensure that the Table/Range: panel contains the range Questionnaire Results!$A$1:$E$351. g. We will create this new PivotTable in the worksheet Questionnaire PT so that it is kept with the first (related) PivotTable. To do this: h. Click in the Existing Worksheet option button under the Choose where you want the PivotTable report to be placed heading so that it contains a check mark. Notice that the Location: panel has become active. (1) We now need to indicate to Excel where it should position the new PivotTable, so click on the worksheet Questionnaire PT, and then click on cell A13, which is where we want the new PivotTable to start from. (2) The Location: panel should now display 'Questionnaire PT'!$A$13 IS348 Introduction to Excel s PivotTables Royal Holloway IT Department Page 22

(3) Click on OK to close the Create PivotTable dialogue box. 88. We want to calculate the amount of times each answer option was selected in Quest 2. The only field we need to calculate this is the Quest 2 field, which we will use in both the Row Labels and Values panels. Therefore to do this: a. In the PivotTable Field List on the right of the window locate the Quest 2 field under the Choose Fields to add to report: heading. b. Then drag the field to the Row Labels panel at the bottom left of the dialogue box. c. Now drag the Quest 2 field under the Choose Fields to add to report: heading into the Values panel at the bottom right of the dialogue box. d. Again drag the Quest 2 field under the Choose Fields to add to report: heading into the Values panel at the bottom right of the dialogue box so that two copies of this field are included in the panel. e. Save the Workbook again by clicking on the save button. f. View the new PivotTable. On the lefthand side is the answer options available (1, 2, 3, 4 and 5) for Question 2, and on the right-hand side are the two columns displaying the total number of respondents for each option. g. We now need to change the Sum of Quest 2 values to Count. To do this: (1) Click on top Sum of Quest 1 entry in the Values panel at the bottom right of the Pivot Table Field List. (2) Click on Value Field Settings to display the Value Field Settings dialogue box. (3) Ensure that the Custom Name: panel states Sum of Quest 2 (4) Also ensure that the Summarize by tab is selected. (5) Select Count from the Summarize value field by: panel. (6) Click on OK to close the Value Field Settings dialogue box and apply the change. h. Save the Workbook again by clicking on the Save button. Royal Holloway IT Department IS348 Introduction to Excel s PivotTables Page 23