Overview What is a PivotTable? Benefits Create a PivotTable Select Row & Column labels & Values Filtering & Sorting Calculations Data Details Refresh Data Design options Create a PivotChart Slicers Charts
Overview of PivotTables: What are Pivot Tables: Pivot Tables are worksheet tables that let you summarize and analyze your Excel data. By selecting key row and column headings, you can obtain different views of your original data. Pivot Table Controls (fields) allow you to arrange how the data is displayed. You can drill down behind your pivot table data to see the details of the original data. Benefits: When you look at hundreds of rows of data, it is very difficult to find any common trends or to understand the correlation between your data elements. Use of a pivot table allows you to effectively analyze your data. Use the following criteria to determine whether your data would work well with a pivot table: At least one column has duplicate values; i.e.: class year or donor codes At least one column is numeric; this is the column you can use to create subtotals. Note: There may be an occasion when you don t have numeric values and all you need to do is count the number of items. Create a PivotTable: Use the PivotTable function to view donor counts and amounts by constituent type: 1. Open the file: Sample.xlsx Important Note: All the amounts in this sheet were randomly entered and no names or identifying information are used. This data is totally false. 2. Click on any cell in the table 3. Click on Insert / Pivot Table 4. Check the table/range box to make sure all your data is selected. If not, click & drag to select all your data or enter the data range. Leave the default to place the PivotTable report on a new worksheet. 5. Click ok 6. Check off the fields you want to use in your report: a. Find the number of donors and their total 2009 and 2010 giving by constituent type: i. Check off DONOR CODE and TOT_FY09 and TOT_FY10 (Notice the list is on a new sheet and the original data is unchanged.) ii. Format the amounts to display $ with 2 decimal places: 1. Select the data P a g e 1
a. Press Home / $ from the number format section or b. right click and select format cells or c. under the Values listed in the PivotTable box, click on Sum of TOT_FY10 and select Value Field Setting / Number Format / Currency / click OK iii. View your PivotTable Field List on the right. Notice the Donor Code field is listed under the Row Labels. Click and drag the field to Column Labels. View the changes then drag the field back to Row Labels. iv. Filter and Sort your data by clicking on the Row Labels heading v. Add a column to count the number of 2010 donors: 1. From the PivotTable field list, click and drag TOT_FY10 to the Values box 2. From the values box, click on TOT_FY10 and enter Count of 2010 donor in the Custom name field then select Count 3. Click on Number Format and select number and zero decimal places vi. Examine the Count information. The system is counting all cells, including donors with zero in the TOT_FY10 field. Remove the zero: 1. Click and drag the TOT_FY10 field to the Report Filter Box 2. Click on the filter arrow and check off Select Multiple Items then deselect 0. vii. Drill down to view the FTRS donors: 1. Double click on the cell containing the total FTRS donors 2. View the list and notice they are on a new sheet tab viii. Go to your original data and filter by FTRS donor and delete one record then refresh the data: 1. Click on your original data sheet and click Data/Filter 2. From the Donor Codes column, check off FTRS only 3. Delete one donor 4. Check the Sheet2 PivotTable and notice there are still 8 donors listed. 5. From the PivotTable Tools options menu, click on Refresh All/Refresh All and the number will be updated Create a PivotTable to report the amount donated in FY09 and FY10 by class year: 1. Go back to your sample data tab and click on Insert / Pivot Table 2. Check the table/range box to make sure all your data is selected. If not, click & drag to select all your data. Leave the default to place the PivotTable report on a new worksheet. 3. Click ok 4. Select the fields: PREF_YEAR and TOT_FY09 and TOT_FY10: 5. Use additional options: a. Filter by row labels and select certain years b. Change the Value Field Setting to Count and change the format to number P a g e 2
Percentages: i. Note: The count is misleading because even the donors with a 0 in TOT_FY are counted. In order to filter out those with a 0, click and drag the TOT_FY10 field to the row labels box (or the report labels box). c. Double click on any cell value to view the detail records Show Value As this option makes it easier to find the percentage of a value without creating formulas. Great when you want to find a percentage of a total. Edit a PivotTable to report the amount donated in FY09 and FY10 by class year: Click and drag the TOT_FY10 field from the Pivot Table list box to the value box on the right. Right click on the column heading in your spreadsheet and click on Show Values As Select % of column total Check out the other options including Rank Largest to Smallest Notes: If your original data is changed, you will need to select Refresh All to update the table. If you are comparing Donor Codes by Pref_year and your list contains 3 Donor Codes and 25 Pref_years, then you will want Pref_years to be listed under Row Labels and Donor Codes listed under Column Labels. This combination makes the table more readable since the columns will be narrow and the rows long. Pivot Report / Design Options Once you have summarized your data using pivot tables, you can add design options to make your data more understandable and interesting. Use the design options to change the look of your pivot table: 1. Go to the page tab labeled Country 2. Click on any cell and click Insert / PivotTable 3. Select Country, Region and Population 4. The on-demand Pivot Table Tools appear in the ribbon (top right) 5. Select the Design tab 6. From the Layout section: a. Choose Blank Rows to insert blank rows between each section b. Choose Report Layout / Show in Outline or Tabular Form to widen the columns c. Choose Subtotals / Show all subtotals at bottom on group d. Choose Blank Rows / Insert blank rows after each section 7. From the Pivot Tables styles section, choose the desired shading: a. Click on the more arrow to display all the available styles and select one P a g e 3
Add Slicers: o Additional filtering with Slicers slicers are used to filter your PivotTable data and allows you to easily view the filters that are applied: Click in your data area Click Insert Slicer from the PivotTable Tools/Options (on-demand tab) Check Region To select specific regions, click on the first region then press control click on all the rest Click on the clear filter icon (in the region slicer box) to remove the filter PivotCharts: PivotTable Charts - data in your chart can easily be selected and changed using control buttons: o Add a PivotChart to analyze your data and use the filter control buttons: Insert a PivotTable Chart: Go to your tab labeled Country and click on Insert then click on the word PivotTable (not icon) and click PivotChart and OK Select your fields: Region and Area Notice the control fields. Click on the Region control and select desired regions. The chart is automatically updated. General Notes: For more information on Pivot Tables, go to www.microsoft.com or any search engine and search for Excel pivot tables. Free tutorials and step-by-step examples are available. P a g e 4