18.11.2014 Views

Microsoft Office

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Part V<br />

Analyzing Data with Excel<br />

This example used Excel’s Grouping dialog box to create the groups automatically. If you don’t<br />

want to group in equal-sized bins, you can create your own groups. For example, you may<br />

want to assign letter grades based on the test score. Select the rows for the first group and then choose<br />

Group from the shortcut menu. Repeat these steps for each additional group. Then replace the default group<br />

names with more meaningful names.<br />

NOTE<br />

Creating a Calculated Field or Calculated Item<br />

Perhaps the most confusing aspect of pivot tables is calculated fields versus calculated items. Many pivot<br />

table users simply avoid dealing with calculated fields and items. However, these features can be useful, and<br />

they really aren’t that complicated once you understand how they work.<br />

First, some basic definitions:<br />

n<br />

n<br />

A calculated field: A new field created from other fields in the pivot table. If your pivot table<br />

source is a worksheet table, an alternative to using a calculated field is to add a new column to the<br />

table, and create a formula to perform the desired calculation. A calculated field must reside in the<br />

Values area of the pivot table. You can’t use a calculated field in the Column Labels, Row Labels,<br />

or in a Report Filter.<br />

A calculated item: A calculated item uses the contents of other items within a field of the pivot<br />

table. If your pivot table source is a worksheet table, an alternative to using a calculated item is to<br />

insert one or more rows and write formulas that use values in other rows. A calculated item must<br />

reside in the Column Labels, Row Labels, or Report Filter area of a pivot table. You can’t use a calculated<br />

item in the Values area.<br />

The formulas used to create calculated fields and calculated items aren’t standard Excel formulas. In other<br />

words, you don’t enter the formulas into cells. Rather, you enter these formulas in a dialog box, and they’re<br />

stored along with the pivot table data.<br />

The examples in this section use the worksheet table shown in Figure 35.13. The table consists of five fields<br />

and 48 rows. Each row describes monthly sales information for a particular sales representative. For example,<br />

Amy is a sales rep for the North region, and she sold 239 units in January for total sales of $23,040.<br />

ON the CD-ROM<br />

A workbook demonstrating calculated fields and items is available on the companion<br />

CD-ROM. The file is named calculated fields and items.xlsx.<br />

Figure 35.14 shows a pivot table created from the data. This pivot table shows Sales (Values area), crosstabulated<br />

by Month (Row Labels) and by SalesRep (Column Labels).<br />

The examples that follow create<br />

n<br />

n<br />

A calculated field, to compute average sales per unit<br />

Four calculated items, to compute the quarterly sales commission<br />

618

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!