















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















the PivotTable. Where a particular value in a row and a particular value in a column intersect, the data in the Amount field is summarised in the centre. By default the calculation used is Sum. So, for example, where Geography and Paper intersect the total amount of Paper ordered by Geography will be displayed i.e. 26.
Creating a PivotTable
Note that the Field List and additional Tabs on the Ribbon only appear when you click on the PivotTable.
Arranging your data
This example shows Average A-Level Points by College. To change the number format: Right-click in the PivotTable, and choose Number Format
To display more than one calculation in the Values area, add the same Field twice. In the example shown below, the Sum and Count are being shown for the Fees Paid to each College. Count of Fees Paid is the number of fees paid to each College.
Field List and Areas Section
Calculated Fields
You can have additional calculations, which are not part of the source data, in your PivotTable. You will use the fields containing numeric data to create new fields. They will become part of the PivotTable and can be used in further calculations.
The following example shows a new field called Increase created by using the field Fees Paid and multiplying by 10%. The new field ( Increase ) can then used in another calculation.
Click anywhere in PivotTable a. On the Options tab, Tools group click on the Formulas button,
then Calculated Field b. Type in name you want to give your new field eg: Increase c. Then in Formula field the calculation required eg =’Fees Paid’*10%
NB: You can type in the field names you want use in the calculation, or select them from the list and use the Insert Field button
Formulae can be modified =’Fees paid’*7% and calculations will be updated immediately.
You can use the new field to create another calculated field: Name: NewFee Formula= Fees Paid+Increase
This is a feature which allows you to create calculations within the PivotTable using the summary figures there. For example, you may want add two fields together to form another heading.
The example below shows new calculated items (field heading NorthEast and SouthWest) which add together North and East sales figures and South and West figures respectively.
Delete or modify calculated items by clicking on the drop-down at the side of the Name: field
Formatting values
In the example below, products ordered (paper and toner) are shown for each department as a percentage of the total for all departments. This is done by displaying values as a percentage of the column total.
Helpful hint : The Field Settings dialog box can be used to change the name of any Field in the PivotTable. For example, this can be used to change the name of Dept to Department.
Grouping numeric items into ranges
In the example below, marks are grouped in intervals of 10 so, for example, you can see that 1 candidate got between 40 and 49 marks in COMPB401 and 4 got between 50 and 59 marks.
Grouping date or time data
Ungrouping
Click on the field you want to ungroup and click on the Ungroup button on the PivotTable Tools Options tab to ungroup specific custom groups, click on the name of the group and then the Ungroup button.
Default grouping for multiple values
Note that grouping automatically occurs where you have more than one Field in the same area (Row or Column). In the example below, the Department and Term fields are both added to the PivotTable as Row Labels. By putting the fields in the order Department then Term, data is grouped by Department. Subtotals are automatically displayed for each grouping i.e. by Department.
Note that you can remove Subtotals in the Field Settings dialog box.
Sorting row or column labels:
Refreshing a PivotTable
When data is changed in the PivotTable source list, the PivotTable does not automatically recalculate. To refresh the table:
Select any part of the PivotTable.
OR
Right-click in the PivotTable, and choose Refresh
You can also have your PivotTables refreshing every time you open the workbook. Click on Options button on the Options tab and tick Refresh data when opening the file on the Data tab:
Extending the dataset
If you add additional columns or rows to you will need to extend the data source of the PivotTable to include them.
Applying the Named Range to a new PivotTable
When you create a new PivotTable, you define the name as the source. Type the range name in he Create PivotTable dialog box:
Applying the Named Range to an existing PivotTable
To use the new name in your PivotTable, you need to change the data source:
Formatting PivotTables
Various options can be used to change the look of PivotTables. These can be found on the PivotTable Tools Design tab. You can apply a PivotTable Style and choose whether or not to have banded columns or rows (i.e. where rows or columns are coloured in alternate shades.
Note that buttons to add or remove Subtotals and Grand Totals are also available on the Design tab.
GetPivotData Function
The =GetPivotTable function will allow you to get information from the PivotTable by referencing field names instead of cell references:
The syntax is: GETPIVOTDATA ( data_field , pivot_table ,field1,item1,field2,item2,...)
=GETPIVOTDATA("total sales",$A$3) Will return the Grand Total 1738900
=GETPIVOTDATA("total sales",$A$3,"area","south") Will return Total sales for the Area South - 327600
=GETPIVOTDATA("total sales",$A$3,"area","south","salesperson","brown") Will return Salesperson Brown’s Total Sales in the South Area - 123200
=GETPIVOTDATA("total sales",$A$3,"salesperson”,”smith) Will return Salesperson Smith’s Total Sales - 398500