0% found this document useful (0 votes)
118 views18 pages

Excel2010 PivotTables

The document describes how to create and format pivot tables in Excel. It explains how to set up data, design a pivot table layout by dragging fields to different areas, use filters and slicers, modify formatting and views, add calculated fields, and create a pivot chart from the table. The objectives are to learn the basics of creating, manipulating, and visualizing data using pivot tables.

Uploaded by

sumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
118 views18 pages

Excel2010 PivotTables

The document describes how to create and format pivot tables in Excel. It explains how to set up data, design a pivot table layout by dragging fields to different areas, use filters and slicers, modify formatting and views, add calculated fields, and create a pivot chart from the table. The objectives are to learn the basics of creating, manipulating, and visualizing data using pivot tables.

Uploaded by

sumit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
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 2010: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.
2.

3.

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


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


1.
2.
3.

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


On Sheet 1 click in any cell in the data table.
Click on the Insert menu, and then click the PivotTable Button

4.
5.

The entire data range selected will be listed


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. On the right is the PivotTable Field List task pane. (Figure 2)

PivotTable placeholder
PivotTable Field List
task pane

Figure 2
The column headings from your data table should be listed:

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 Row Labels area at the bottom.
(Figure 3)

Figure 3

2.

Drag the Country field to the Column Labels area. The countries will appear across the top of the PivotTable, in a single row.
(Figure 4)

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

4.

Drag the Category field to the Report Filter. (Figure 6)

Figure 6

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 based on
these fields
To filter the pivot table to show only fruit (Figure 7):
1.
2.
3.

Click the Category drop-down arrow.


Click to select Fruit from the list.
Click OK.

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

Figure 8
Try changing the display to only vegetables and 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.
2.

Click the Design Tab under PivotTable Tools on the Ribbon.


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
7

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 second style in the third row, Pivot Style Light 15. (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.
2.

Click and drag the Product field from the Row Labels panel to the Columns panel
Then click and drag the Country field from the Column Labels panel to the Row Labels panel.

Figure 12

CHANGE THE FIELDS USED: (FIGURE 13)


1.

Drag the Date field to the Report Filter Panel

Figure 13
2.
3.
4.

Date now appears as another filter at the top of the chart.


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.
Change the Date filter back to All to display all the data.
9

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.

Click the drop-down arrow for Sum of Amount in the Values panel (Figure

2.

Choose Value Field Settings

14)

Figure 14
In the window that appears you have the following choices: (Figure 15)
1. Summarize Values By Change from the default Sum to other calculations such as Count, Average, Max, Min, etc.
2. Show Values As 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:

10

2. From the Category list choose Currency


and change the number of decimal places to
zero. (Figure 17) and click OK

Figure 17

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. Instead of a sum for the order we
need a count.

ADD THE ORDER ID FIELD TO THE PIVOT TABLE:


1. In the PivotTable Field List panel, click the box next to
Order ID.
2. Sum of Order ID will be added to the Values section.
(Figure 18)
Alternatively, you can drag Order ID down to the Values Panel and
Values will automatically be added under Column Labels.

CHANGE THE SUMMARY FUNCTION OF ORDER ID FROM S UM TO


COUNT:
1. Click on the drop-down arrow for Sum of Order ID in the
Values panel.
2. Choose Value Field Settings

11

Figure 18
3.
4.

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

Figure 20

12

Choose Count under Summarize Values By


Change the Custom Name to Number of Orders. (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.
2.

With your pivot table open, click the Options Tab under PivotTableTools on the Ribbon.
Click the Field, Items, & Sets button and choose Calculated Field (Figure 21)

Figure 21
3.
4.
5.
6.

In the panel that appears, type Tax in the Name.


Click on Amount in the list of Fields and click Insert Field. The Formula box should now say =Amount
Type in *.07, the complete formula should read =Amount*.07
Click OK. Tax should now appear in the PivotTable Field List

Figure 22

13

ADD THE NEW CALCULATED FIELD TO THE PIVOT TABLE:


1.
2.

Check the box next to Tax in the PivotTable Field List.


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.
2.

Drag Product from the Column Labels panel to Row Labels, placing Product below Country. (Figure 24)
The table pivots to show Products listed below each country. (Figure 25)

Figure 24

Figure 25
14

3.
4.

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

Figure 26

Figure 27

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.
2.

With your pivot table selected, click on the Options tab under PivotTable Tools on the Ribbon and click the drop-down
arrow next to Insert Slicer. (Figure 32)
Check the boxes next to Product and Category. (Figure 33) and click OK.

Figure 32
3.

Figure 33

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

16

CREATE A PIVOT CHART


1.
2.

Click in your pivot table


Click the Options Tab under PivotTable Tools on the Ribbon and then click on PivotChart. (Figure 28)

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

Figure 29

4.

Click the Move Chart button on the Ribbon and move to a new sheet. Name the chart Pivot Chart (Figure 30).

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. Non-numeric 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 10/1/2015
18

You might also like