best practices for authoring structured & accessible...

29
Information Technology MS Office 2007/10 Users Guide Excel 2007/2010 Don’t be afraid of PivotTables Prepared by: Tina Purtee Information Technology (818) 677-2090 [email protected]

Upload: others

Post on 30-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Information Technology MS Office 2007/10 Users Guide

Excel 2007/2010

Don’t be afraid of PivotTables

Prepared by: Tina Purtee

Information Technology

(818) 677-2090

[email protected]

Page 2: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [ DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page i

Table of Contents

Introduction ............................................................................................................................ 1

What is a PivotTable? ........................................................................................................ 1

What can you do with PivotTables? .................................................................................... 1

Advantages of using PivotTables ....................................................................................... 1

Choosing Appropriate Data for a Pivot Table ...................................................................... 1

Get Started ............................................................................................................................. 2

Insert a PivotTable ............................................................................................................. 2

Creating the PivotTable Layout .......................................................................................... 3

Build a PivotTable report ................................................................................................. 4

Change & Arrange Pivottable Fields/Data .............................................................................. 4

Move Field List Items to a Different Field ............................................................................ 5

Customize Layout & Make Common Cosmetic Changes ....................................................... 6

Report Layout Options ....................................................................................................... 6

Apply a Table Style ........................................................................................................... 9

Change Number Format ................................................................................................... 9

Replace Blanks with Zeros ..............................................................................................10

Change Report Fields .......................................................................................................11

Change Row & Values Field Labels & Names ................................................................11

Change Values Field Settings ........................................................................................11

Filter PivotTable Items...........................................................................................................13

Narrow the Filter ................................................................................................................14

Summarize Data - Options ....................................................................................................14

Group / Ungroup Data in Pivot Fields ................................................................................14

Change the Value to Percent of Total Function .................................................................16

What is a Calculated Item or Field? .......................................................................................18

Calculated Field ................................................................................................................18

Calculated Item .................................................................................................................20

Delete/Remove a Calculated Field or Item ........................................................................22

View all formulas used in a PivotTable ..................................................................................22

Edit a PivotTable formula ......................................................................................................23

Page 3: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 –PivotTables Page ii

Refresh a PivotTable .............................................................................................................24

PivotTable Resources & Tutorials .........................................................................................24

Page 4: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 1 of 25

INTRODUCTION

What is a PivotTable?

PivotTables are designed to help users make sense of a large set of data by providing an easy

way to build a summarized report. They provide a means to view a set of data in a variety of

configurations within a matter of minutes. They are an interactive worksheet table that provides

a powerful tool for quickly summarizing, organizing and analyzing large amounts of data from an

Excel spreadsheet in a report format without changing the structure of your original spreadsheet

data.

What can you do with PivotTables?

Make your life easier by using data from a spreadsheet and quickly manipulate that data

and data relationships to create reports with meaning.

A great reporting tool that can analyze numerical data, sort and sum independent of the

original data layout in the spreadsheet.

Manipulate data relationships to extract information not easily seen in the spreadsheet.

Advantages of using PivotTables

PivotTables are an amazing slice-and-dice tool in Excel with extremely feature-rich drag and

drop user-friendly multidimensional capabilities.

They are interactive, which means you can easily rearrange them by moving, adding, or

deleting fields. Add different fields to Rows, Columns, Data, to get different views and

summaries of the data.

They are dynamic, which means results are automatically recalculated whenever fields

are added or dropped, or whenever categories are hidden or displayed.

Can do any kind of “What-If” scenario with any kind of calculated fields within it.

Excellent drill downs, group by, sorting, charting, emailing, printing, exporting and

conditional formatting capabilities.

Rotate rows and columns to see different summaries and relationships of the source

data.

Use drag and drop to move fields.

Automatically recalculates the figures and presents accurate figures.

Choosing Appropriate Data for a Pivot Table

Before you begin setting up a PivotTable be sure your source data (Excel worksheet) is well

prepared for the report.

1. Data resides in an Excel spreadsheet.

2. It conforms to fundamental Excel database structural conventions. Data should adhere

Page 5: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 2 of 25

to these basic rules:

a) Each column of the database should contain the data for a single field.

b) Each row of the database should contain the fields relating to a single record.

c) The first row of the database should contain the field name.

d) There should be no blank rows or columns embedded within the database.

3. Two types of data fields in your spreadsheet.

Data: contains a value

Category: Describes the data

It is very important that your data is in proper format, otherwise trying to use a PivotTable

reports will not be effective.

GET STARTED

To set up a PivotTable, the data in the spreadsheet being used must conform to Excel

database conventions. Be sure it has column titles and is in list format.

Insert a PivotTable

1. Position the cell pointer anywhere within the range of cells defining the database on your

spreadsheet.

2. From the Insert Tab, in the Tables group, select the PivotTable down arrow, then

select the PivotTable option.

3. The Create PivotTable dialog box displays.

PivotTable

down arrow

Page 6: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 3 of 25

4. The Select a table or range field

is already selected for you,

however, if Excel is not reflecting

the spreadsheet data range

needed, correct it.

5. New Worksheet is selected by

default. Select Existing

Worksheet if you do not want the

report placed in a new worksheet

but in the workbook you are

working in.

6. Select OK.

Creating the PivotTable Layout

The PivotTable layout area seen in the figure below is what you see in the new worksheet after

you have selected OK to close the Create PivotTable dialog box.

#1 The layout area – Is to help you decide where the data should appear in the PivotTable

report.

Page 7: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 4 of 25

#2 The PivotTable Field List – Shows the column titles/categories from the source data

worksheet and the drag-and-drop fields of a PivotTable. #3 PivotTable Area – Where the data will appear. Each item in the PivotTable Field List can be selected and dragged to the PivotTable layout. The table below describes the four areas used to arrange data in the PivotTable. Page, Row

and Column are axes of the PivotTable that contain the fields used to define how data is to

be summarized.

Area Description

Report Filter Displays data separately for each item in the field.

Row Labels Displays items in the field as row labels.

Column Labels Displays items in the field as column labels.

Values Displays the values from the field in the body of the PivotTable. This

is the field on which you will perform a summary calculation.

Build a PivotTable report

1. Select an item in the field list.

2. Drag the item to a location in the “Drag fields between areas below” section in the PivotTable Field list box. You can also click on the check box, but watch to see where Excel places it in the Field list box. It may not go where expected.

3. The results display at the left in the PivotTable as you drag and drop fields.

4. Continue to drag fields to display in the area you want them to appear on the PivotTable. You do not have to use all the fields in the field list.

5. The Data area MUST have at least one field in it.

CHANGE & ARRANGE PIVOTTABLE FIELDS/DATA

A pivot table is not a static object. You can continue to modify and tweak it until it looks exactly

how you want it to look. Don’t worry about building a report incorrectly. Excel makes it easy to

try things out and to see how data looks in different relationships (areas of the report). If a

report is not how you want it at first, just lay out the data in another way by dragging the field to

a different area.

Page 8: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 5 of 25

Move Field List Items to a Different Field

1. In the Drag fields between areas below section, left click and hold the mouse button

down on the field you want to move. See figure 4.

2. Drag the field to another area of the report in this same section.

3. The change is immediately apparent in the PivotTable report at the left.

NOTE: To remove a field from a report, clear the check box beside the field name in the

PivotTable Field List. To remove all the fields from the report so that you can start over, on

the Ribbon, from the Options tab, in the Actions group, click the arrow on the Clear button,

and then select Clear All.

TIP: If you click outside of the layout area (of a PivotTable report) the PivotTable Field List

disappears. To get the field list back, click inside the PivotTable layout area or report.

To remove a field from the PivotTable, simply deselect the check box of the item in the

“Choose fields to add to report:” area of the PivotTable Field List.

To add fields to the PivotTable, click the check box next to the item in the “Choose fields

to add to report:” area of the PivotTable Field List. Next, drag the item to the appropriate

field list area.

Page 9: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 6 of 25

To move a field around in the PivotTable, drag and drop the field list item to the new

placement on the PivotTable area. Either the Report Filter, Row Labels, Column Labels or

Value area.

Dropping a field in the wrong position can produce very different results than what you

expect. If your pivot table is not analyzing the data quite the way you expect, try changing

the relative positions of the row or column fields.

Multiple fields can be dropped into the report areas thus creating a multidimensional

summary of the data. The names of the fields and items can be changed simply by editing

any occurrence of that particular field or item.

NOTE: The order in which you enter the fields in the row and column areas affect how the data

in the PivotTable is grouped.

CUSTOMIZE LAYOUT & MAKE COMMON COSMETIC CHANGES

Excel’s PivotTable feature allows you to present your data in a number of ways. However, often

the default settings don’t meet your needs or demands? How can you navigate the numerous

places where you can customize a pivottable?

A few changes need to be made to almost every pivottable. These make your pivottable easier

to understand and interpret.

Report Layout Options

To make substantial changes to the layout and format of the report, you can organize the entire

report into three forms - compact, outline, or tabular. Add, rearrange, and remove fields to get

the final results that you want.

Compact Form = Use to keep related data from spreading horizontally off of the screen

and to help minimize scrolling. Beginning fields on the side are contained in one column

and are indented to show the nested column relationship. This is the default view for a

new PivotTable.

Outline Form = Use to outline the data in the classic PivotTable style. This view puts

items in the Row Labels field side by side instead of stacked as in Compact view. By

default, total/subtotals appear at the top of each item in the row label fields.

Tabular Form = Use to see all data in a traditional table format and to easily copy cells

to another worksheet. This form is similar to Outline, however, by default the

total/subtotals appear at bottom instead of top of a row label field.

Page 10: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 7 of 25

To access the three layout view options:

1. First, make sure you have selected a cell within the

PivotTable. Next, select the Design Tab.

2. In the Layout Group, select the Report Layout

Command down arrow. Select one of the 3 layout view

options from the submenu.

Compact Layout – additional function

When in Compact Layout, there is one additional layout function available.

The ability to expand or collapse a Row Field Item.

Handy feature. Collapse data when wanting to show only a roll up.

Expanded data by row field item to show just the detail for an individual item or

expand all the detail.

To use this function:

1. From the Options Tab, in the Active Field

Group select either Collapse Entire Field or

Expand Entire Field.

2. When selecting Collapse Entire Field, row items are shown in a high level roll up

of the data. However, each item will have a small plus (+) sign next to it. Select

the plus (+) sign to expand the detail of that item.

Page 11: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 8 of 25

There are other key layout options available to you in the Layout Group of the Design

Tab.

1. Subtotals Command – changes where subtotals appear within a group.

2. Grand Totals Command – changes if and where grand totals will appear.

3. Blank Rows Command – inserts a blank row after each item for ease of

viewing.

Each of these 3 options gives you flexibility

in displaying the data.

Page 12: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 9 of 25

Apply a Table Style

Easily apply a table style that will give your pivottable a professional look and be much

easier to view.

1. Make sure that the active cell is in the pivottable.

2. From the Design tab, in the PivotTable Styles Group, select one of the 74 design

styles available.

Change Number Format

While your spreadsheet data may contain numeric formatting, this formatting does not carry

over to a pivottable unfortunately. By default, pivottable presents values formatted with a

general format.

To quickly change the numeric format to show place values or other numeric format

features:

1. Right-click a value in the pivottable and select Value Field Settings from the

shortcut menu. The Value Field Settings dialog box displays.

Page 13: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 10 of 25

2. Select the Number Format button. The Format Cells dialog box displays.

3. Make format choices:

a. Category

b. Decimal Places

c. Comma

separator

4. Select Ok and Ok from

the Value Field

Settings dialog box.

Replace Blanks with Zeros

One element of good spreadsheet design is that you should never leave blank cells in a

numeric section of the worksheet. If your source data for a pivot table contains 1 million

numeric cells and 1 blank cell, Excel 2007 treats the entire column as if it were text. This

default setting for a pivot table leaves many blanks in the values area of some pivot tables.

Follow the steps to change this setting:

1. Select a cell inside the pivot table.

2. From the Options tab, from the Pivot

Table group, choose Options to

display the PivotTable Options dialog

box.

3. On the Layout & Format tab, in the

Format section, type 0 next to the

field labeled For Empty Cells Show.

4. Select OK.

Page 14: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 11 of 25

Change Report Fields

When first creating a PivotTable, every field has a name. Fields in the row, column, and filter

areas inherit their names from the heading in the source data. Fields in the data section are

given names such as Sum of . . . . In some instances, you may prefer a different name.

Fortunately, these fields are customizable.

Change Row & Values Field Labels & Names

These fields are easily customized so that the label title makes sense with the data.

To change a Row or Values label:

1. Double click the field, i.e. Row Labels as shown in the figure above.

2. Highlight over the existing text and type the new name for the field.

Change Values Field Settings

When placing data into the Values field on a PivotTable, Excel makes assumptions about the

data in the field. In the figure below, you can see that the Budgeted, Pre Encumbered and

Encumbered fields have automatically formatted as a Sum function (totaling function). This may

or may not be the correct way you wish to display the information.

To access the options to change the field settings:

1. Right-Click the field name on the PivotTable.

Page 15: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 12 of 25

2. From the short cut menu select Summarize Data By.

3. Select the desired numeric function OR to change the Value label name select “More

Options”.

4. From the Value Field Setting dialog box in the Source Name field, change the name

leaving a blank space as the first character in front of the new name.

Summarize by tab: Lets you change the type of subtotaling that is displayed.

Subtotaling is relevant only if you have more than one field displayed as rows or

columns.

Subtotals can calculate using many different functions, which are available in

the Summarize value field by area of the dialog box. The following are

functions with explanations.

o COUNT - how many occurrences

o AVERAGE - arithmetic mean of occurrences

o MAX - Maximum value

o MIN - Minimum value

o PRODUCT - Product of all values

o STDDEV - standard deviation

o VAR - variance

Page 16: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 13 of 25

FILTER PIVOTTABLE ITEMS

PivotTable items can be filtered similar to the items of an Excel Spreadsheet. Column Labels

and Row Labels both can be filtered on a PivotTable.

1. Filter Arrow indicators appear on both the Column Labels and Row Labels field.

2. Left Click the filter arrow.

3. From the sub menu, clear the “Select All” check box in the list. This clears the check

boxes next to every item in the list.

4. Select the check box next to the item to

be filtered. The PivotTable report will

show only the data for that item.

TIP: It is not always easy to tell if data has

been filtered or not. When an item is in

filtered mode, the filter icon arrow changes.

A filter icon also appears next to the field

name in the PivotTable Field List.

Page 17: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 14 of 25

Narrow the Filter

Filtering can be narrowed to show only specific items within the filter. Filter the report to a single

type by using the following method:

1. Select the range of cells for the single item type. See figure below.

2. Right-Click and select Filter from the shortcut menu.

3. From the sub menu select Keep Only Selected Items.

Now just the item type data selected should be displayed. The new filter hides all the other

items.

SUMMARIZE DATA - OPTIONS

There are so many different options for viewing and changing data in a Pivot Report. Some

possibilities include grouping data or changing a sum function from adding amounts to a count

function or percent function.

To see the options available, right-click on the column or row title or a Total or Subtotal Cell.

Group / Ungroup Data in Pivot Fields

Any numeric / date type pivot field can be grouped. Items in a Row or Column field can be

grouped for ease of viewing. For example, items in a date field can be grouped by month,

quarters, etc., and items in a number field can be grouped by tens.

e.g.

Page 18: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 15 of 25

1. Right-click on the row or column heading. Sometimes you will want to group data within

a group of cells. So highlight the cells with the data you want to group, then right-click.

2. Select the Group option. The Grouping dialog box displays.

3. In the “By” section, select the group type. The Grouping dialog box options may vary

depending on the data being grouped.

To find more information on grouping data go to: http://www.contextures.com/xlpivot07.html

Page 19: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 16 of 25

Change the Value to Percent of Total Function

What if you wanted to calculate the percentage of the grand total. Use the custom

calculation option to create a running total, or calculate percentage.

To do this:

1. Right-click in the Values area.

2. From the shortcut menu, point to Summarize Data by.

3. From the Submenu, Select the More Options.

4. The Value Field Settings dialog box appears. See figure below.

5. Select the Show values as tab.

6. From the Show values as field, use the drop down arrow at the right of the field, scroll down to select % of total.

7. Select the OK button.

The Pivot Report Sum of Amount column changes to now reflect percentages. See Figure below.

Page 20: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 17 of 25

There are other custom calculations that can

be performed using the same steps as

previous. Below, you will find a table that lists

each of those custom calculation functions

and their results.

Custom Calculations

Function Result

Normal Turns off custom calculations

Difference From Displays values as the difference from the

value of the Base item in the Base field

% Of Displays values as a percentage of the value

% Difference From Displays values as a percentage difference

from the value

Running Total In Displays value for successive items in the

Base field as a running total

% of row

Displays the value in each row or category as

a percentage of the total for the row or

category.

% of column

Displays all the values in each column or

series as a percentage of the total for the

column or series.

% of total

Displays values as a percentage of the grand

total of all the values or dat points in the

report.

Page 21: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 18 of 25

WHAT IS A CALCULATED ITEM OR FIELD?

A calculated item or calculated field allows the user to insert a new data item or field into the

pivot table – one which does not exist in the base data but gets its value from a formula. The

formula in turn can include existing fields, numbers and other arithmetical operators.

Whenever you create a pivot table, by default, the list of available fields to work with is the same

as the set of columns specified as the source data. So if the pivot table’s underlying data

consists of say “Account”, “Fund”, “Dept”, “Program”, “Budgeted”, “Encumbered” and “Balance”,

you will only be able to use those fields and place them in page, row, column or data fields.

However, when creating a Calculated Item/Field, it acts as an additional value available.

Calculated Field

PivotTables act a bit differently than a spreadsheet. In a spreadsheet you can insert additional

rows or columns, however, in a PivotTable you cannot. Using the calculated field function

allows you to create a customized field that acts as a combination of one or more already

existing pivot fields. The best way to visualize a calculated field is to think of it as an additional

column in your underlying source data but with restriction that it can only be used as a data field

(and not as a row, column or page field).

1. Select any cell within the pivot table.

2. From the Options tab, in the Tools Group, select the Formulas command button

down arrow.

Page 22: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 19 of 25

3. In the drop-down box, select Calculated Field.

4. The Insert Calculated Field dialog box displays.

5. Complete the following fields:

Name: - type the name of the new field as you would like it to appear in the

PivotTable.

Formula: - This field is where you place the formula for the new fields you want

to calculate. After the equal (=) sign, highlight the “0” then double click the field

wanted from the “Fields:” list, use an arithmetic operator (*, /, +, -, etc) between

the field as you would in a normal Excel formula, then select the next field

wanted. e.g. =Budgeted – Encumbered.

Page 23: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 20 of 25

6. Excel creates this new column in your PivotTable returning the results of the Formula.

NOTE: The new column appears with the data results but does not show the formula used

in the Formula bar when cell is selected. To view the formula for calculated fields:

a. From the Options Tab, in the Tools Group, select the Formulas drop-down

arrow and select List Formulas from the submenu.

Calculated Item

The calculated item is similar to a calculated field and is based upon a formula – the actual field

does not exist in the pivot table and its values get calculated based on the relationships

specified in the formula. The formula can contain references to other items of the same field,

numbers and operators. A calculated item can be inserted in a row field.

To create a Calculated Item follow these steps:

1. Select a cell within the pivot table Row Labels.

2. From the Options tab, in the Tools

Group, select the Formulas command

button down arrow.

3. The Insert Calculated Items Window

displays.

Page 24: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 21 of 25

4. Complete the following fields:

Name: - type the name of the new field how you want it to appear in the

PivotTable.

Formula: - This field is where you place the formula for the new fields you want

to calculate. After the equal (=) sign, highlight the “0” then double click the field

wanted from the “Items:” list, use an arithmetic operator (*, /, +, -, etc.) between

the field as you would in a normal Excel formula, then select the next item

wanted e.g. =AMC+EDU.

5. Excel creates a new row in your PivotTable and returns the results of the Formula.

Page 25: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 22 of 25

6. The new row appears with the data results but does not show the formula used in the

Formula bar when cell is selected. To view the formula for calculated items:

From the Options Tab, In the Tools Group, select the Formulas drop-down

arrow and select List Formulas from the sub menu.

Delete/Remove a Calculated Field or Item

To delete or remove a calculated field or item from your PivotTable:

1. From the Options tab, in the Tools Group, select the Formulas command button

down arrow.

2. Select either the Calculated Field or Calculated Item option depending upon which

one you wish to remove.

3. The Insert Calculated Field or Item window displays.

4. In the Name: field, type the name it was given, then select the Delete button at right.

The field/item should now be removed from the PivotTable.

VIEW ALL FORMULAS USED IN A PIVOTTABLE

To display a list of all the formulas that are used in the current PivotTable report, do the

following:

1. Click a cell within the PivotTable boundaries.

2. From the Options tab, in the Tools group, select Formulas, and from the submenu

select List Formulas.

3. A new sheet will be created in the workbook showing the formulas that exist in the

PivotTable report.

Page 26: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 23 of 25

EDIT A PIVOTTABLE FORMULA

Determine whether the formula is in a calculated field or a calculated item. If the formula is in a

calculated item, determine whether the formula is the only one for the calculated item by doing

the following:

1. Click within the PivotTable boundaries.

2. From the Options tab, in the Tools group, select Formulas, and from the submenu

select List Formulas.

3. In the list of formulas, find the formula that you want to change listed under Calculated

Field or Calculated Item.

NOTE: When there are multiple formulas for a calculated item, the default formula that was

entered when the item was created has the calculated item name in column B. For additional

formulas for a calculated item, column B contains both the calculated item name and the names

of intersecting items.

4. Do one of the following:

EDIT A CALCULATED FIELD FORMULA

a) Click within the PivotTable boundaries.

b) From the Options tab, in the Tools group, select the Formulas command icon down

arrow, and select Calculated Field from the submenu. The Insert Calculated Field or

Item window displays.

c) In the Name field, select the calculated field which you want to change the formula.

d) In the Formula field, edit the formula.

e) Click the Modify button.

EDIT A SINGLE FORMULA FOR A CALCULATED ITEM

a) Click on the field that contains the calculated item.

b) From the Options tab, in the Tools group, select the Formulas command icon down

arrow, and select Calculated Item from the submenu.

c) In the Name field, select the calculated item.

d) In the Formula field, edit the formula.

e) Click the Modify button.

Page 27: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 24 of 25

REFRESH A PIVOTTABLE

If data is changed on the source spreadsheet, a refresh of the PivotTable is necessary in order to have the changes reflected in the PivotTable. To do this:

1. From the Data Tab in the Connections Group select the small drop down arrow

next to the Refresh All command button.

2. Choose Refresh from the option menu to refresh the current active worksheet or

Refresh All to refresh all PivotTables in the workbook.

PIVOTTABLE RESOURCES & TUTORIALS

There is a variety of information and resources available to you about PivotTables. One

resource I like is:

Getting Started with Excel PivotTables - http://www.contextures.com/xlPivot01.html

Scroll to the bottom of the page to find a plethora of PivotTable Tutorials, Books,

Videos and Add-Ins. An example of tutorial titles available include:

Excel Pivot Table -- Introduction

Excel Pivot Table -- Clear Old Items

Excel Pivot Table -- Create a Pivot Table in Excel 2007

Excel Pivot Table -- Custom Calculations

Excel Pivot Table -- Data Field Layout

Excel Pivot Table -- Dynamic Data Source

Excel Pivot Table -- FAQs

Excel Pivot Table -- Field Settings

Excel Pivot Table -- Filter Source Data

Excel Pivot Table -- Filters, Top 10

Excel Pivot Table -- GetPivotData

Excel Pivot Table -- Grand Totals

Excel Pivot Table -- Grouping Data

Excel Pivot Table -- Layout, Excel 2007

Excel Pivot Table -- Multiple Consolidation Ranges

Excel Pivot Table -- Pivot Cache

Excel Pivot Table -- PivotTable Style

Excel Pivot Table -- Printing

Excel Pivot Table -- Protection

Excel Pivot Table -- Report Filters

Excel Pivot Table -- Running Totals

Excel Pivot Table -- Show and Hide Items

Excel Pivot Table -- Sorting

Page 28: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10 [DON’T BE AFRAID OF PIVOTTABLES]

Excel 2007/10 – PivotTables Page 25 of 25

Excel Pivot Table -- Subtotals

Excel Pivot Table -- Summary Functions

Excel Pivot Table -- Unique Items

Design the layout and format of a PivotTable Report -

http://office.microsoft.com/en-us/excel-help/design-the-layout-and-format-of-a-

pivottable-report-HP010168032.aspx#BMchange_the_pivottable_report_form:_co

Find topics such as:

Change the form layout and field arrangement

o Change the PivotTable report form: compact, outline, or tabular

o Add, copy, rearrange, and remove fields

Change the layout of columns, rows, and subtotals

o Turn column and row field headers on or off

o Display subtotals above or below their rows

o Change the order of row or column items

o Adjust column widths on refresh

o Move a column to the row labels area or a row to the column labels area

o Merge or unmerge cells for outer row and column items

Change how blank cells, blank lines, and errors are displayed

o Change how errors and empty cells are displayed

o Display or hide blank lines

o Change how items and labels with no data are shown

Change or remove formatting

o Change the PivotTable format style

o Conditionally format data in a PivotTable report

o Change the number format for a field

Other Resource for Excel PivotTable Calculated Item =

http://www.contextures.com/excelpivottablecalculateditem.htm#Create

http://blogs.office.com/b/microsoft-excel/archive/2008/05/09/pivottables-calculated-

items.aspx#fbid=JahtAqLfevU

To access an online copy of this document go to: www.csun.edu/~tpurtee

Page 29: Best Practices for Authoring STructured & Accessible Documentstpurtee/Excel07_PivotTables.pdf · The table below describes the four areas used to arrange data in the PivotTable. Page,

Excel 2007/10-PivotTables 3/1/12 Prepared by Tina Actis-Purtee

IT’s technology training guides are the property of California State University, Northridge. They are

intended for non-profit educational use only. Please do not use this material without citing the source.