Planning and Creating a Pivot Chart

Một phần của tài liệu Excel 2007 PivotTables Recipes (Trang 203 - 206)

Problem

The sales manager is preparing for a budget meeting in the East region, and she asked you to create a pivot chart, to show the sales for each food category at each store.

You created a pivot table on the Region Pivot worksheet, with Store and Category in the Row Labels area, and Quantity in the Values area. Region is in the Report Filters area, with East selected from the drop-down list.

You aren’t sure which type of chart will work best, and you’re having trouble arranging the fields so the chart looks right. The meeting is tomorrow, and you’re running out of time. This problem is based on the Budget.xlsxsample file.

Solution

When you create a pivot chart, it will use the same layout as the pivot table on which it’s based.

• Fields in the pivot table’s Row Labels area become the fields on the pivot chart’s category axis—the horizontal axis across the bottom of a column or line chart.

• Fields in the pivot table’s Column Labels area become legend fields(series) in the pivot chart—the lines or columns.

• Fields in the pivot table’s Values area become the values in the pivot chart, and they determine the height of a column, or the position of the point on a line.

• Fields in the pivot table’s Report Filters area continue to act as filters in a pivot chart.

When planning a pivot chart, consider how you want the fields arranged in the chart. If no fields are in the Column Labels area, the chart will have only one series, representing the fields in the Row Labels area. In this example, with Store and Category fields in the Row Labels area,

189

a column chart would have one column for each store’s sales in each category. All the columns would be the same color.

If you move the Store field to the Column Labels area and create a pivot chart, each store would be a series, with a different colored column for each store. You could compare the sales of each category, to see which store had the best or worst sales.

If, instead, you move the Category field to the Column Labels area and create a pivot chart, each category would be a series, with a different colored column for each category. You could compare the sales at each store, to see which category had the best or worst sales.

In this example, the presentation is to the store managers, who may be interested in how well their stores are performing, compared to the other stores.

1. In the pivot table, move the Store field to the Column Labels area, and leave the Category field in the Row Labels area.

2. To create a pivot chart, select a cell in the pivot table, and on the Ribbon, click the Options tab.

3. In the Tools group, click PivotChart.

4. The Insert Chart dialog box opens, where you can select a chart type and subtype. For this chart, select a Column chart type, and a Clustered Column subtype, and then click OK. A column chart is a good choice if you are comparing sets of numbers, as in this case, where you want to compare the total sales for each category at each store.

This creates a pivot chart on the same worksheet as the pivot table (see Figure 10-1). Each store is represented by a different color column, with the colors and store numbers shown in the chart’s legend. The category names appear on the horizontal axis at the bottom of the chart, and you can see which store had the best or worst sales for each category. The height of each bar represents the quantity sold in each store, for each category. Because the pivot table is fil- tered to show the East region’s sales, the pivot chart is also filtered.

Figure 10-1.The pivot chart shows sales per category.

It may take some experimentation, moving the fields to different areas of the pivot chart, but try to create a chart that presents a limited amount of data, in a clean and simple chart layout. To see the different layouts available with the Store, Category, and Quantity fields, try the following:

1. With the pivot chart selected, move Store to the Axis Fields (Categories) area, below Category. This creates one series, with the legend entry of Total. All the columns are blue, and two sets of labels are on the horizontal axis. The category names are the outer labels on the axis, and store numbers are the inner labels. This layout lets you compare the sales for all categories at all stores, but the horizontal axis is crowded, and the single color makes the chart difficult to read at a glance.

2. Move Store above Category in the Axis Fields (Categories) area. This creates one series, with blue columns, and the legend entry of Total. The store numbers are the outer labels on the horizontal axis, and category names are the inner labels. This layout lets you compare the sales for all stores and all categories, but the horizontal axis is crowded, and the labels are hard to read.

3. Move Category to the Legend Fields (Series) area. This creates a different colored series for each category. The store numbers are labels on the horizontal axis, and you can compare how well the categories sold, within each store.

4. Move Store to the Legend Fields (Series) area, above Category. This creates a different colored series for each store’s sales of each category. The legend contains a lengthy list of store and category names, and the chart is crowded and difficult to read.

How It Works

The Insert Chart Type dialog box shows a list of chart types at the left. At the right are the sub- types available for each chart type. You can point to a subtype and see its name in a tooltip.

Selecting a Chart Type

Unless you changed the setting, the default chart type in Excel is a clustered column chart.

Several chart types are available in Excel:

Columnand bar chartsare almost the same, except bars are displayed horizontally across the chart and columns are vertical. Both of these chart types work well for com- paring specific values, as you’re doing in your chart.

Line chartsand area chartsconnect the points that represent values and are good for illustrating changes over time. The charts are the same, except the area charts are filled with color.

Pie chartsand doughnut chartsshow the percentage each value comprises in the overall total. The pie chart type works well when there is a single series and value, such as total quantity per region. A doughnut chart can show multiple series.

Surface chartsand radar chartsare specialized chart types you can use to show differ- ences in the data or aggregated data.

Note Although they are available in the list of chart types, you cannot use the X Y (Scatter), Bubble, or Stock chart types when creating a pivot chart.

Selecting a Chart Subtype

After you select a chart type in the Insert Chart Type dialog box, its default chart subtype is automatically selected. You can select a different subtype, to meet the requirements of your current chart. The following are a few of the options:

• Clustered column and bar subtypes are useful if you want to compare the individual values in a series. In the current example, a clustered column lets you compare the cat- egory sales at each store, side-by-side.

• Stacked column and bar subtypes combine individual values in a single column or bar, and they let you compare totals. For example, if you select Stacked Column as the sub- type for the current chart, with Store in the Axis Fields (Categories) area, and Category in the Legend Fields (Series) area, the chart will have a single column for each store.

Each category is represented by a different color.

• The 100 percent Stacked column and bar subtypes combine individual values in a single column or bar that represents 100 percent of each item’s value. This lets you compare percentages within each item. For example, if you select 100 percent Stacked Column as the subtype for the current chart, with Store in the Axis Fields (Categories) area, and Category in the Legend Fields (Series) area, the chart will have a single col- umn for each store. All the columns are the same height, and within each column, each category’s color shows its percentage of the store’s sales.

• Line charts and area charts also have stacked and 100 percent stacked subtypes similar to those for the column and bar charts.

• The remaining chart types have subtypes you can test on your pivot charts. Most of these, such as Line with Markers or Exploded Pie, are simply a different format, rather than a different layout of the data.

Tip Avoid using the 3-D chart subtypes, because they distort the representation of the data in your charts.

Một phần của tài liệu Excel 2007 PivotTables Recipes (Trang 203 - 206)

Tải bản đầy đủ (PDF)

(259 trang)