0% found this document useful (0 votes)
50 views

Excel 2013: Pivot Tables

Pivot tables allow users to interactively analyze and summarize large datasets. Key features include the ability to filter data, sort data in different ways, and calculate summaries. This document provides instructions on how to set up data for a pivot table, create a basic pivot table, modify and format the pivot table, add calculated fields and slicers, and create a pivot chart visualization. The objectives are to learn the basics of pivot tables in Excel 2013.

Uploaded by

Khuda Buksh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Excel 2013: Pivot Tables

Pivot tables allow users to interactively analyze and summarize large datasets. Key features include the ability to filter data, sort data in different ways, and calculate summaries. This document provides instructions on how to set up data for a pivot table, create a basic pivot table, modify and format the pivot table, add calculated fields and slicers, and create a pivot chart visualization. The objectives are to learn the basics of pivot tables in Excel 2013.

Uploaded by

Khuda Buksh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

SIU Medical Library

Department of Information & Communication Sciences

Excel 2013: Pivot Tables


Objectives:

Learn how to set up your data in Excel in a format that you can use for a pivot table.
Create a pivot table with that data
Filter pivot table reports
Change the summary function used in the pivot table
Format a pivot table and change pivot table options.
Change the pivot table report to reflect different views on the same data.
Create a PivotChart with your pivot table

About Pivot Tables


Analyze and summarize data without disturbing the original data set
Sort to look up data in chronological order
Filter to limit scope to certain values you specify.
Place the pivot table on its own worksheet.
Use pivot tables to produce pivot charts to present the information in a graphical way.

Setting up data for use in pivot tables


1. Organize data in columns with headings.
These headings will be used when you create the pivot table, and things will get very confusing without
headings. 2. Make sure there are no empty columns or rows in your data.
Excel is good at sensing the start and end of a data table by looking for empty rows and columns at which
point it stops.
Empty cells are OK.
A whole row of column of empty cells is NOT OK.
3. Consistent data in all cells.
If you have a date column, make sure all values in that column are dates (or blank).
If you have a quantity column, make sure all values are numbers (or blank) and not words.

Create a pivot table from Excel worksheet data


Open Data.xlsx (find file at http://www.siumed.edu/lib/libclasses.html#excelpivot )and Save As Data Pivot.xlsx
1.
2.
3.
4.

On Sheet 1 click in any cell in the data table.


Click on the Insert tab, and then click the PivotTable Button
The entire data range will be selected
Choose to place the PivotTable in a new worksheet and click OK. (Figure
1)

Figure 1

A PivotTable empty placeholder will appear on the left and the PivotTable Field List task pane will appear on the
right. (Figure 2)

PivotTable placeholder

PivotTable Field
List task pane

Figure 2
The column headings from your data table should be listed in the task pane on the right:

Design your pivot table layout


To create the layout, you need to first select the fields you want in your table, and then place them in the correct
location.
Drag and drop each field to the area you want. Although you can check the boxes for the fields you want to include,
Excel will guess where each field should be placed, and not always correctly.

1. In the PivotTable Field List task pane, drag the Product field from the top section to the Rows area at the bottom.
(Figure 3)

Figure 3

2. Drag the Country field to the Columns area. The countries will appear across the top of the PivotTable, in a single
row. (Figure 4)
3. Drag the Amount field to the Values area at the bottom.
The totals appear at the intersection of the row and column labels on the PivotTable. (Figure 5)

Figure 4

Figure 5

4. Drag the Category field to the Filters section. (Figure 6)

Figure 6
5

Use the Report Filter


Fields dragged to the Report Filter appear at the top of the pivot table. You can filter the entire pivot table report
To filter the pivot table to show only fruit (Figure 7):
1. Click the Category drop-down arrow.
2. Click to select Fruit from the list.
3. Click OK.

Figure 7
The table will change to show only fruit. (Figure 8)

Figure 8
Try changing the display to only vegetables, then change it back to All.

Modify the Pivot Table


Formatting
Formatting tools are available on the Design Tab that appears on the Ribbon under the PivotTable Tools contextual
tab.
Change the Report Layout:
1. Click the Design Tab under PivotTable Tools on the Ribbon.
2. From Report Layout drop-down, choose Show in Tabular Form.
This format displays the cell borders and changes the columns to equal widths. (Figure 9)

Figure 9
Change the Table Design
1. On the PivotTable Tools Design Tab, click the drop-down arrow to see all the available styles. (Figure 10)

Figure 10

2. Choose fifth style in the third row, Pivot Style Light 18. (Figure 11)
Other formatting options include banded rows and banded columns

Figure 11

Pivot the Tables Fields


Pivot tables allow you to rotate or pivot the data fields used as rows and columns. You can also change which fields
are used and how they are presented.
Switch the columns and rows in your pivot table: (Figure 12)
1. Click and drag the Product field from the Row Labels panel to the Columns panel
2. Then click and drag the Country field from the Column Labels panel to the Row Labels panel.

Figure 12
8

Change the fields used:


1. Drag the Date field to the Filters section. (Figure 13)

Figure 13
2. Date now appears as another filter at the top of the chart.
3. Click on the drop-down arrow by Category and choose Fruit, then click on the drop-down arrow by Date and
select 1/8/2012 from the list to display only fruit sold on that date.
4. Change the Date filter back to All to display all the data.

Change the Value Field Settings


The default calculation for the Value field is the Sum of the Amount.
To represent values in different ways:
1.
14)
2.

Click the drop-down arrow for Sum of Amount in the Values panel (Figure
Choose Value Field Settings

Figure 14

In the window that appears you have the following choices: (Figure 15)
1. Summarize Values By tab: Change from the default Sum to other calculations such as Count, Average, Max,
Min, etc.
2. Show Values As Tab: Change from No Calculation to percentages and other options.
3. Number Format Change the number format for the Value field

Figure15

Change the number format to display dollars:


1.
Click the Number Format button:
2.
From the Category list choose
Currency and change the number of decimal
places to zero. (Figure 17) and click OK

Figure 16
10

Add a field to the pivot table and change its summary function
For this exercise we want to know the number of orders for a particular country or product. We need a count
instead of a sum of the order numbers

Add the Order ID field to the pivot table:


1. In the PivotTable Fields List panel, click the check box next to
Order ID.
2. Sum of Order ID will be added to the Values section. (Figure
17)
Alternatively, you can drag Order ID down to the Values Panel
Change the Summary Function of Order ID from Sum to
Count:
1. Click on the drop-down arrow for Sum of Order ID in the
Values panel.
2. Choose Value Field Settings

Figure 17
3. Choose Count under the Summarize Values By
4. . Change the Custom Name to Number of Orders tab
(Figure 18)

Figure 18

11

Your pivot table should now look like the excerpt below (Figure 20).

Figure 19

Create and Modify Calculated Fields


You can create calculated fields, which are computed by assigning a formula using numeric fields in your data source

Exercise: Create a calculated field for a 7% sales tax on the sales amount..
1. With your pivot table open, click the Analyze Tab under PivotTableTools on the Ribbon.
2. Click the Field, Items, & Sets button and choose Calculated Field (Figure 20)

Figure 20

12

3. Type Tax in the Name field.


4. Click on Amount in the list of Fields and click Insert Field. The Formula box should now say =Amount

Figure 21
5. Type in *.07, the complete formula should read =Amount*.07

Figure 22
6. Click OK. Tax should now appear in the PivotTable Field List

13

Add the new calculated field to the pivot table:


1. Check the box next to Tax in the PivotTable Field List.
2. Sum of Tax will be added to the Values panel and will appear on the pivot table. (Figure 23)

Figure 23
Rearrange the view
1. Drag Product from the Columns panel to Rows, placing Product below Country. (Figure 24)
2. The table pivots to show Products listed below each country. (Figure 24)

Figure 24
14

3. Rearrange again by dragging Country below Product in the Row Labels panel.
4. The table pivots to show the countries listed below each product. (Figure 25)

Figure 25

Use Slicers to Filter Pivot Table Data


Slicers provide buttons that you can use to quickly filter pivot table data and see at a glance which items in a category
are being using to filter data. Each slicer is designed to filter on a specific pivot table field, so you can create more
than one for a pivot table report.
.A slicer contains the following:
Slicer header, indicating the category of the items in the slicer.
Clear Filter button removes the filter by selecting all items in the slicer
Filtering buttons for each of the category items..

15

To add a slicer:
1. With your pivot table selected, click the Analyze tab under PivotTable Tools on the Ribbon and click Insert
Slicer. (Figure 26)

Figure 26
2. Check the boxes next to Product and Category. (Figure 33) and click OK.

Figure 27
3. Two slicers are inserted into the pivot table. You can click on the buttons to add filters rather than use dropdowns. Visually, it is easier to see which filters are in use.

Figure 28
16

Create a Pivot Chart


1. Click in your pivot table
2. Click the Analyze Tab under PivotTable Tools on the Ribbon and then click on PivotChart. (Figure 28)

Figure 28
3. Choose the first Column chart style - Clustered Column. (Figure 29) and click OK.

Figure 29
4. Right click on the edge of the chart, choose Move Chart and move the chart to a new sheet. Name the chart Pivot
Chart (Figure 30). OR click in the chart, choose the Design tab under PivotChart Tools on the Ribbon and click the
Move Chart button.

Figure30
17

5. Just like the pivot table, use the PivotTable Field List to add or delete field and filter the results. (Figure 31)

Figure 31
Try dragging Product below Country in the Axis Fields panel and clicking to remove the check by Tax in the Field List.

Table Summary Functions


Count: Show the count of the records for a particular category. Count is the default for any text fields that you use as
Data Items.
Average: Calculate the average for the values in the field for the current category and page filter.
Max: Display the largest numeric value in that field for the current category and page filter.
Min: Display the smallest numeric value in that field for the current category and page filter.
Product: Display the product of the numeric values in that field for the current category and page filter.
Count Numbers: Display the number of numeric values in that field for the current category and page filter. Nonnumeric entries are ignored.
StdDev: Display the standard deviation for the sample in that field for the current category and page filter.
StdDevp: Display the standard deviation for the population in that field for the current category and page filter.
Var: Display the variance for the sample in that field for the current category and page filter.
Varp: Display the variance for the population in that field for the current category and page filter.

CG 11/17/2016

18

You might also like