Manual - Pivot Tables

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Pivot tables PivotTables enable you to extract meaning from large amounts of data.

A PivotTable enables you to take what seems to be an indecipherable mass of facts and extract any trends and patterns buried in the data. You can organize and summarize your data, perform comparisons, and extract meaningful information that can be invaluable to you and your organization.

Necessity of Pivot Tables Please have a look at the data below (data can be found in pivot tables.xls which will have been circulated to you), it shows various aspects regarding sugar such as production, consumption, stocks, exports etc in a country wise, year wise format. In its current format the data is arranged in almost 54,000 rows, thereby making it impossible to extract any meaningful information such as: Total world sugar production and exports from 1991 onwards List of country wise sugar consumption in 2007 and 2010 Maximum sugar production by an individual country from 1991 onwards

In order to extract the required information it is required to create a pivot table.

Creating a pivot table Select the data from which you want to create a pivot table and on the insert tab of the ribbon click Pivot Table. If you have not selected a range when clicking pivot table, excel will attempt to select an appropriate range for you, check the range selected by excel and click OK. Note that it is always advisable to insert the pivot table on a new worksheet, this is the default option.

The pivot table is inserted in a new worksheet. Components of a Pivot Table Once the pivot table has been inserted you will see a layout such as the one below. As you can see the pivot table has three main components: the data area, field list and layout box.

2 3

1. Data area: This is where the pivot table is displayed. How the displayed is dependent on the choices made in components 2 & 3 the field list and the layout box respectively. 2. Field list: This controls what fields are to be displayed in the pivot table. You can chose to add any or all of the fields to the pivot table. 3. Layout box: This area defines where and how the data shows on your pivot table. You can have a field show in either a column or row. You may also indicate if the data should be counted, summed, averaged and so on. The default option is to sum.

Extracting information from the pivot table Now that we have created the pivot table let us try to extract the following information from it: Total world sugar production and exports from 1991 onwards List of country wise sugar consumption in 2007 and 2010 Maximum sugar production by an individual country from 1991 onwards Total world sugar production and exports from 1991 onwards 1. Select country from the field list and drag it to the report filter section of the layout box, similarly drag year to the row label section, attribute to the column label section and value to the values section. 2. Once done with the above, select attribute in the field list and click on the drop down arrow. Select only beet sugar production and cane sugar production in the resulting dialog box and click OK

3. Pivot table is displayed as below.

List of country wise sugar consumption in 2007 and 2010 1. Deselect all items from the field list. 2. Drag Country to the row label section of the layout box, similarly drag first year and then attribute to the row labels section and finally drag value to the values section. 3. Select year in the field list and filter for only the years 2007 and 2010. 4. Select attribute in the field list and filter for only Human Dom. Consumption 5. Pivot table is displayed as below.

Note what happens if in the column labels section you drag attribute above year. It affects the layout of the table. The order in which items appear also affects the layout of the pivot table.

Maximum sugar production by an individual country from 1991 onwards 1. Deselect all items from the field list. 2. Drag year to the row label section of the layout box, similarly drag attribute to the row labels section and finally drag value to the values section. 3. Select attribute in the field list and filter for Production. 4. In the layout box in the values section, click on value and select value field settings. In the dialog box that pops change the function from sum to max 5. Pivot table is displayed as below.

6. You can then copy the max values to another sheet and use the vlookup formula to determine which country has the highest production in each year. Conclusion The above three examples are meant to illustrate the power and flexibility of pivot tables. You can in a similar manner create any number of different layouts for your pivot table. Remember that there is no such thing as a single correct layout for pivot table. The different layouts will help you understand and illustrate the properties of the underlying data set.

You might also like