Excel2010 PivotTables
Excel2010 PivotTables
Learn how to set up your data in Excel in a format that you can use for a pivot table.
Create a pivot table with that data
Filter pivot table reports
Change the summary function used in the pivot table
Format a pivot table and change pivot table options.
Change the pivot table report to reflect different views on the same data.
Create a PivotChart with your pivot table
3.
Organize data in columns with headings. These headings will be used when you create the pivot table, and things will get
very confusing without headings. Make sure there are no empty columns or rows in your data. Excel is good at sensing the start and end of a data table by
looking for empty rows and columns at which point it stops.
If you have a date column, make sure all values in that column are dates (or blank).
If you have a quantity column, make sure all values are numbers (or blank) and not words.
4.
5.
Figure 1
A PivotTable empty placeholder will appear on the left. On the right is the PivotTable Field List task pane. (Figure 2)
PivotTable placeholder
PivotTable Field List
task pane
Figure 2
The column headings from your data table should be listed:
1.
In the PivotTable Field List task pane, drag the Product field from the top section to the Row Labels area at the bottom.
(Figure 3)
Figure 3
2.
Drag the Country field to the Column Labels area. The countries will appear across the top of the PivotTable, in a single row.
(Figure 4)
Figure 4
3.
The totals appear at the intersection of the row and column labels on the PivotTable. (Figure 5)
Figure 5
5
4.
Figure 6
Figure 7
The table will change to show only fruit. (Figure 8)
Figure 8
Try changing the display to only vegetables and then change it back to All.
This format displays the cell borders and changes the columns to equal widths. (Figure 9)
Figure 9
7
On the PivotTable Tools Design Tab, click the drop-down arrow to see all the available styles. (Figure 10)
Figure 10
2.
Choose second style in the third row, Pivot Style Light 15. (Figure 11)
Figure 11
SWITCH THE COLUMNS AND ROWS IN YOUR PIVOT TABLE: (FIGURE 12)
1.
2.
Click and drag the Product field from the Row Labels panel to the Columns panel
Then click and drag the Country field from the Column Labels panel to the Row Labels panel.
Figure 12
Figure 13
2.
3.
4.
Click the drop-down arrow for Sum of Amount in the Values panel (Figure
2.
14)
Figure 14
In the window that appears you have the following choices: (Figure 15)
1. Summarize Values By Change from the default Sum to other calculations such as Count, Average, Max, Min, etc.
2. Show Values As Change from No Calculation to percentages and other options.
3. Number Format Change the number format for the Value field
Figure15
10
Figure 17
ADD A FIELD TO THE PIVOT TABLE AND CHANGE ITS SUMMARY FUNCTION
For this exercise we want to know the number of orders for a particular country or product. Instead of a sum for the order we
need a count.
11
Figure 18
3.
4.
Figure 19
Your pivot table should now look like the excerpt below (Figure 20).
Figure 20
12
EXERCISE: CREATE A CALCULATED FIELD FOR A 7% SALES TAX ON THE SALES AMOUNT..
1.
2.
With your pivot table open, click the Options Tab under PivotTableTools on the Ribbon.
Click the Field, Items, & Sets button and choose Calculated Field (Figure 21)
Figure 21
3.
4.
5.
6.
Figure 22
13
Figure 23
Drag Product from the Column Labels panel to Row Labels, placing Product below Country. (Figure 24)
The table pivots to show Products listed below each country. (Figure 25)
Figure 24
Figure 25
14
3.
4.
Rearrange again by dragging Country below Product in the Row Labels panel. (Figure 26)
The table pivots to show the countries listed below each product. (Figure 27)
Figure 26
Figure 27
15
TO ADD A SLICER:
1.
2.
With your pivot table selected, click on the Options tab under PivotTable Tools on the Ribbon and click the drop-down
arrow next to Insert Slicer. (Figure 32)
Check the boxes next to Product and Category. (Figure 33) and click OK.
Figure 32
3.
Figure 33
Two slicers are inserted into the pivot table. You can click on the buttons to add filters rather than use drop-downs.
Visually, it is easier to see which filters are in use.
16
Figure 28
3. Choose the first Column chart style. (Figure 29) and click OK.
Figure 29
4.
Click the Move Chart button on the Ribbon and move to a new sheet. Name the chart Pivot Chart (Figure 30).
Figure30
17
5.
Just like the pivot table, use the PivotTable Field List to add or delete field and filter the results. (Figure 31)
Figure 31
Try dragging Product below Country in the Axis Fields panel and clicking to remove the check by Tax in the Field List.
CG 10/1/2015
18