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

FIGURE 35.4<br />

Pivot tables with options for subtotals and grand totals.<br />

Automatic grouping examples<br />

When a field contains numbers, dates, or times, Excel can create groups automatically. The two examples in<br />

this section demonstrate automatic grouping.<br />

Grouping by date<br />

Figure 35.5 shows a portion of a simple table with two fields: Date and Sales. This table has 730 rows and<br />

covers the dates between January 1, 2005, and December 31, 2006. The goal is to summarize the sales<br />

information by month.<br />

ON the CD-ROM<br />

A workbook demonstrating how to group pivot table items by date is available on the companion<br />

CD-ROM. The file is named sales by date.xlsx.<br />

Figure 35.6 shows part of a pivot table created from the data. The Date field is in the Row Labels section<br />

and the Sales field is in the Values section. Not surprisingly, the pivot table looks exactly like the input data<br />

because the dates have not been grouped.<br />

To group the items by month, select any date and choose PivotTable Tools ➪ Options ➪ Group ➪ Group<br />

Field (or, right-click and choose Group from the shortcut menu). You see the Grouping dialog box, shown<br />

in Figure 35.7.<br />

In the By list box, select Months and Years and verify that the starting and ending dates are correct. Click<br />

OK. The Date items in the pivot table are grouped by years and by months, as shown in Figure 35.8.<br />

612

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

Saved successfully!

Ooh no, something went wrong!