Please download IntroExcel-Part2-SampleWorkbook.xlsx to follow along with workshop activities.
Throughout this workshop Click refers to a Left Click with your mouse
Generate PivotTables
In Excel, a PivotTable is a special type of table that allows you to summarize data and identify patterns, trends, or interesting comparisons.
Excel sometimes uses the word report when talking about PivotTables.
Today we will insert a blank PivotTable, build a PivotTable, and create a PivotChart.
Insert a Blank PivotTable
First, let’s navigate to Sheet2 in our workbook.
- Highlight all of our data
- Option 1: Click
Cell A1, hold down theShiftkey on your keyboard, and clickCell D23 - Option 2: Click
Cell A1and drag to highlight all data OR - Option 3: Hit
Ctrl + Aon your keyboard (Cmd + Afor Mac users)
- Option 1: Click
- Navigate to the
Inserttab and theTablessection (on a Mac, navigate to theDatatab and theAnalysissection) - Click
PivotTable(on a Mac, click on the drop-down arrow by thePivotTableicon and clickCreate Manual PivotTable) - Under
Choose the data you want to analyze, confirm that:Select a table or rangeis selected- Verify that cell range in the
Table/Rangebox is correct
- Under the
Choose whereoptions, selectNew Worksheet - Click OK
Build a PivotTable
After inserting a blank PivotTable, we can now build a PivotTable based on the data.
Our columns and the data within them are represented as fields that we can add to the PivotTable.
In PivotTables, we can place our fields in four different areas:
- Filters
- Fields you want to use to
isolate or focusyour data
- Fields you want to use to
- Columns
- Headings that display the
unique valuesfrom specific fields
- Headings that display the
- Rows
- Fields you want to use to
group and categorizeyour data
- Fields you want to use to
- Values
- Fields you want to
measure
- Fields you want to
Part 1
Let’s say we want to create a PivotTable to see whether students who attended SI sessions following Test 1 had higher Test 2 scores on average than those who did not.
- Navigate to the PivotTables Fields box
- If this box disappears,
clickthe PivotTable - Navigate to the
Analyzetab and theShowsection (on a Mac, navigate to thePivotTabletab and theViewsection) - Click
Field List(on a Mac, clickBuilder)
- If this box disappears,
- Click
Test 1anddrag and dropit in theVALUESsection- We can see that this
fieldis now calledSum of Test 1
- We can see that this
In the VALUES section, to change this value to an average
- Click the drop-down arrow for
Sum of Test 1 - Click
Value Field Settings - In the
Summarize Values Bytab, clickAverage - Click
Number Formatbox, clickNumber, and change thedecimal places to zero - Click OK, then click OK again
- Test 1 is now called
Average of Test 1
- Test 1 is now called
Now we can add the Test 2 field
- Click
Test 2anddrag and dropit in theVALUESsection afterAverage of Test 1- Follow the steps above to
Summarize Values Bythe averageTest 2scores
- Follow the steps above to
- Click
SI Sessionsanddrag and dropit in theROWSsection
Part 2
Right now, our PivotTable shows that on average, students who attended SI Sessions had a higher Test 2 score than those who did not.
We also see that the number of SI Sessions attended makes a difference. On average, students who attended three or four SI Sessions had the greatest Test 2 score increase.
However, since this data is based on the average off all students, we might want to get more granular and view individual students, their actual Test 1 and Test 2 scores, and the number of SI Sessions attended.
To view individual Student scores:
- Click
Studentanddrag and dropit in theROWSsection afterSI Sessions
Now we can see which students participated in SI Sessions, how many sessions they attended, and their Test 1 and Test 2 scores.
This PivotTable data may help us encourage students to start attending or continue attending SI Sessions.
Create a PivotChart
Now that we have our PivotTable, we can use it to make a chart.
- Click the PivotTable
- Navigate to the
Analyzetab and theToolssection - Click
PivotChart - Select a chart option
- Example: Clustered Column
- Click OK
To remove student names from the chart:
- Click the
PivotChart - Right click the
Studentdrop-down box - Click
Remove Field
Now our chart helps us visualize the impact of SI Session attendance on average Test 2 scores.
More Help
PivotTables offer greater control and flexibility when presenting and analyzing data. To learn more about PivotTables, visit Microsoft’s PivotTables website.