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

A calculated field is basically a way to display new information in a pivot table. It essentially presents an<br />

alternative to creating a new column field in your source data. In many cases, you may find it easier to<br />

insert a new column in the source range with a formula that performs the desired calculation. A calculated<br />

field is most useful when the data comes from a source that you can’t easily manipulate — such as an external<br />

database.<br />

In the sales example, for example, suppose that you want to calculate the average sales amount per unit.<br />

You can compute this value by dividing the Sales field by the Units Sold field. The result shows a new field<br />

(a calculated field) for the pivot table.<br />

Use the following procedure to create a calculated field that consists of the Sales field divided by the Units<br />

Sold field:<br />

1. Select any cell within the pivot table.<br />

2. Choose PivotTable Tools ➪ Options ➪ Tools ➪ Formulas ➪ Calculated Field. Excel displays<br />

the Insert Calculated Field dialog box.<br />

3. Enter a descriptive name in the Name box and specify the formula in the Formula box (see<br />

Figure 35.15). The formula can use worksheet functions and other fields from the data source.<br />

For this example, the calculated field name is Avg Unit Price, and the formula is<br />

=Sales/’Units Sold’<br />

4. Click Add to add this new field.<br />

5. Click OK to close the Insert Calculated Field dialog box.<br />

FIGURE 35.15<br />

The Insert Calculated Field dialog box.<br />

You can create the formula manually by typing it or by double-clicking items in the Fields list<br />

NOTE<br />

box. Double-clicking an item transfers it to the Formula field. Because the Units Sold field contains<br />

a space, Excel adds single quotes around the field name.<br />

620

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

Saved successfully!

Ooh no, something went wrong!