PivotTable
What is a PivotTable?
A PivotTable is a summary created from a worksheet (source data) in a report form that summarizes and analyzes large amounts of data. The report displays data in an interactive format which allows you to view data in a way that makes large amounts of data understandable without making irreversible changes to the original worksheet.
PivotTable Environment
PivotTable Field List- top right section displays the fields, check a field or drag and drop it to the lower portion of the list.
PivotTable Field List areas- lower right section identifies how and where the data shows in the PivotTable. A field can be displayed either a column or row. Data can be counted, totaled, averaged, and so on by dragging into the Values area.
PivotTable Report- The blue outlined area is the result of your selections from the Field List. Row and Column fields usually contain text values, where a data fields usually contains numeric data.
PivotTable Tools
Some commands are available only when completing a task, in the examples below, the task is a PivotTable Report.
Analyze Tab
Design Tab
The tab is divided into three groups: select any cell in the PivotTable and click on the Design tab.
Layout Group- add subtotals and grand totals and modify the basic layout.
PivotTable Style Options- improve or perfect the style you selected.
PivotTable Styles-a gallery of styles can be applied to the active table, click on thumbnail.
Data - This is the most important step
Each column has to have a unique header name, ensure that there are no empty columns, and each cell has data in it and NO blank cells or rows- because Excel includes the blank rows in the PivotTable Report, delete any blank rows.
Consistent Data- ensure that each column contains the same type of data. For example, in a column of part numbers, be sure each value is numeric; in a column model names, make sure each value is text.
Accurate Data- values used are accurate, check there are no typos or irrelevant data.
Automatic Subtotals- Excel will not create a PivotTable that has subtotals displayed, remove all subtotals. Click on Data, Subtotals, select Remove All.
Filtered Data- subset of the worksheet data, Excel will still use some or all the hidden rows in PivotTable report, the report will not be exact. Use Excel’s advanced filter Feature, copy results to a different worksheet and use the copied data as the source for PivotTable Report.
Column Labels- a PivotTable uses column labels to classify and name data fields.
Create a PivotTable
A data source is needed to create a PivotTable, click a cell within your Excel table that you want to use as the data source for the PivotTable.
From the Insert tab, within the Tables group, click on the PivotTable icon.
Within the Create PivotTable dialog box, ensure that the displayed range is correct, by default New Worksheet is chosen to place the PivotTable report.
Click OK.
By default, an empty PivotTable is created and is located in a new tab in the current workbook.
Populate PivotTable
Within the PivotTable Field List pane, Drag and Drop fields into one of the four pane areas below. A green checkmark indicate that a field is in use.
To remove a field, simply click and drag it back up to the field list.
Or click on down arrow of the field in use and select Remove Field.
Remove all fields, from the Analyze tab, within the Actions group, click on Clear , and select Clear All.
Show or Hide the PivotTable Field List Pane, from the Analyze tab, within the Show/Hide group click on the Field List icon to display PivotTable Field List Pane.
Field List Pane
PivotTables can have multiple fields per area and some PivotTables will not need to have a field in each area. A good way to learn how the fields act together is by experimenting with different combinations.
Row Labels- make up the horizontal (X) axis. Fields normally include: Products, Names, Locations
Values- make up the vertical (Y) axis. Fields normally include: Sales, Units, Measures
Column Labels- different types or series of data that are compared in a PivotChart. Fields Normally include: Dates, Months, Years & Time
Change PivotTable Design
From the PivotTable Tools Design tab, within the PivotTable Styles group, and click on a thumbnail from the gallery to select a new style. Use the down arrow icon to open the gallery window and view more options.
With the PivotTable report selected, from the Design tab, within the Layout group, click on Report Layout down arrow and select one of the following:
Show in Compact Form – keep data from spreading horizontally off the screen
Show in Outline Form – outline data in classic PivotTable style
Show in Tabular Form – traditional table format, easy to copy to another worksheet
Repeat All Item Labels or Do Not Repeat All Item Labels
Highlight every other row or column in a table will make it easier to read the data within a large table.
With the PivotTable report selected, from the Design tab, within the PivotTable Style Options group, click Banded Rows and/or Banded Columns.
Draw attention to row or column headers in a PivotTable and highlighting these areas in a table.
With the PivotTable report selected, from the Design tab, within the PivotTable Style Options group, click Row and/or Column Headers.
Format a PivotChart
With the PivotChart selected, from the Design tab, within the Type group, click on the Change Chart Type icon. This will launch the Change Chart Type dialog box, select type and click OK.
From the Design tab, within the Chart Styles group, select from the gallery a new visual style. To view all the options available click on the icon to the right of the gallery list.
From the Format tab, within the Current Selection group, click on the icon to select the chart element you want to format.( i.e., Legend)
Adding and Removing Elements
To add or remove the chart title element:
From the Design tab, within the Chart Layouts group, click on the Add Chart Element button, and select an option from the menu.
To add or remove the axis title element:
Click on the Plus sign next to the chart and select which options you want to add or remove from the chart.
Slicers
A visual tool applied to a PivotTable or PivotChart allowing data to be quickly and easily filter in an interactive way.
With the data selected i.e., PivotTable, from the Analyze tab, within the Filter group, and click on the Insert Slicer button.
From the Slicers dialog box, check which fields to create a slicer for and click on OK.
Within the slicer box, click a button to filter the data, hold CTRL or SHIFT while clicking on multiple buttons.
For more options with the slicer selected, from the Slicer Tools Options tab, within the Slicer Styles group and select an option from style gallery.
Right-click on the slicer box and select Remove from the drop down menu to delete a slicer box.
Format Slicers
Customize button size and layout – select slicker and click on Slicer Tools Options tab.
Customize behavior and Captions – right-click slicer and select Slicer Settings Option.