You are on page 1of 53

Get more out of PivotTables

A simple PivotTable gives you an overall summary of your data,


but sometimes you need detailed answers to specific questions.
That's where adding more column fields and row fields can help.

Let's go >

GOOD TO KNOW
Did you take the first tutorial? If not, go to File > New and find Make your first PivotTable.
Version 29-May-2020
In the first part of this class, we introduced you to the concept of a PivotTable. W
explained how a row field can be used as a condition that breaks up a value field.

PivotTable
Country PI Site Type Subjects
This examplBelgium Indigo Non-University 24
The row field...
...breaks upFrance Orange University 72 Country
UK Purple Non-University 21 Belgium
Belgium Blue University 40 France
UK Black GP 13 UK
France Silver GP 5 Total Result
UK Yellow University 34

...breaks up the value field

Previous
ncept of a PivotTable. We also
aks up a value field.

PivotTable

Sum - Subjects
64
77
68
209

...breaks up the value field.

Next
But when you first look at a PivotTable, you might find that you need more answers

Which type of sites are


enrolling in each country?

Which site has enrolled Which type of sites have


most subjects? Country Sum - Subjects
enrolled most subjects?
Belgium 64
France 77
UK 68
Total Result 209

Previous
u need more answers out of it.

Which type of sites have


enrolled most subjects?

Next
These are all good questions, but for the moment let's focus on just one question...

Which type of sites are


enrolling in each country?

Country Sum - Subjects


Belgium 64
France 77
UK 68
Total Result 209

Previous
just one question...

Next
We answered that question by adding a column field. As a result, the PivotTable no
three new columns that show us the type of site per country.

We added a column field here, which gave


us three new columns...

Sum - Subjects Site Type


Country GP Non-University University Total Result
Belgium 24 40 64
France 5 72 77
UK 13 21 34 68
Total Result 18 45 146 209

...and the value field is broken up even further.

Previous
the PivotTable now has

Next
If the PivotTable is hard to understand, try this: Read from the left, then from the to
then down. The example below is for Belgium, but it would work for France and UK too.
...24 subjects were ...40 subjects were ...adding up to a
...0 subjects were enrolled in a Non- enrolled in a total of 64
enrolled by a GP. University hospital University hospital subjects enrolled.

Sum - Subjects Site Type


In Belgium... Country GP Non-University University Total Result
Belgium 24 40 64
France 5 72 77
UK 13 21 34 68
Total Result 18 45 146 209

Previous
t, then from the top, and
rance and UK too.

...adding up to a
total of 64
subjects enrolled.

Next
How did we make the column field? We dragged the Site Type field, down to the Co
in the PivotTable Fields list.

Previous
ield, down to the Columns area

Next
Practice

Click inside the Do you see the In the PivotTable


1 PivotTable below.
2 PivotTable Fields list
3 Fields list, drag the
on the right? Good! (If Site Type field down
you don't see it, to the Columns area.
right-click the (Like we showed you
PivotTable below and on the previous
choose Show Field sheet.)
List.)

Sum - Subjects Site Type


Country GP Non-UniversitUniversity Total Result
France 38 103 141
Italy 72 72
Spain 48 125 173
UK 35 85 112 232
Total Result 121 157 340 618

Previous
Country PI Site Type Subjects
Spain Coral GP 48
France Orange University 103
Italy Olive Non-Universit 72
UK Purple Non-Universit 85
UK Black GP 35
UK Yellow University 112
France Silver GP 38
Spain Salmon University 125
The PivotTable below should
4 automatically expand to
include those three columns
for Site Type.

Next
Let's review the PivotTable you just made, but this time we've added some special co
colors make it easy for you to see where the row, column, and value fields are located.

Row field Column field

Sum - Subjects Site Type


Country GP Non-University University
France 38 103
Italy 72
Spain 48 125
UK 35 85 112
Total Result 121 157 340
Value field

Previous
added some special colors. The
ue fields are located.

Total Result
141
72
173
232
618

Next
Here's another way to think about it: The row field is on the left, and the column field
top. Each of these provide a condition to the value field, which sums them up.

...and the column field


provides a condition....

The row field provides


a condition.... ...and the value field
sums them up.

Previous
and the column field at the
s them up.

...and the column field


provides a condition....

...and the value field


sums them up.

Next
Think of it that way when using the fields list. The row field is on the left, and the co
at the top. Each of these provide a condition to the value field, which sums them up.

...and the column field


provides a condition....

The row field provides a


condition.... ...and the value field
sums them up.

Previous
he left, and the column field
ums them up.

...and the column field


provides a condition....

...and the value field


sums them up.

Next
One thing to be aware of: If a column field adds a lot of columns to a PivotTable, it wil
very wide.

In this example, the column field added 12 new columns. That's a lot of colu
This will cause people to scroll a lot...

Sum - Subjects Site Type


Country City Clinic Clinic GP
France 20
Italy 38 62
Spain 10
UK 42
Total Result 38 62 72

Previous
Country PI Site Type Subjects
Spain Coral GP 10
France Orange University 50
Italy Olive Non-University 32
UK Purple Non-University 26
UK Black GP 42
UK Yellow University 73
France Silver GP 20
Spain Salmon University 84
Italy Maroon Clinic 54
Spain Turquoise Private Hospital 25
France Springgreen National Hospital 39
Spain Bluesky University 76
Italy Greengrass National Clinic 34
Spain Redtomato Private Clinic 15
Spain Gray City Hospital 85
UK Snow University 74
Spain Ivory National Hospital 70
UK Pink Group Practice 36
Italy Lavender Clinic 8
UK Lime State Clinic 28
Italy White City Clinic 38
mns to a PivotTable, it will make it

12 new columns. That's a lot of columns!


ple to scroll a lot...

National Hospital Non-University Private Hospital University National Clinic


39 50
32 34
70 25 160
26 147
109 58 25 357 34

Next
Private Clinic State Clinic City Hospital Group Practice Total Result
109
166
15 85 365
28 36 279
15 28 85 36 919
But here's an alternative to that: You can use a second row field instead. A second ro
appear indented under the first row field.

Country Site Type Sum - Subjects


First row field
France
GP 20
Second row field National Hospital 39 GOOD TO KN
University 50 A second row fie
First row field vertically-oriente
Italy
City Clinic 38 than horizontal.
vertical PivotTab
Clinic 62 because they do
Second row field
National Clinic 34 scrolling from sid
Non-University 32
First row field
Spain
City Hospital 85
Second row field GP 10
National Hospital 70
Private Clinic 15EXCEL SPEAK
Private Hospital 25Sometimes peopl
First row field University 160field a "secondary
UK
GP 42
Second row field Group Practice 36
Non-University 26
State Clinic 28
University 147
Total Result 919

Previous
nstead. A second row field will

GOOD TO KNOW
A second row field makes a
vertically-oriented PivotTable rather
than horizontal. Some people find
vertical PivotTables easer to read
because they don't require as much
scrolling from side-to-side.

EXCEL SPEAK
Sometimes people call a second row
field a "secondary row field."

Next
On the next sheet you'll add a second row field. And you'll do that by dragging the
field under the Country field.

Previous
by dragging the Site Type

Next
Practice

Click inside the Do you see the In the PivotTable Fields


1 PivotTable below.
2 PivotTable Fields list
3 list, drag the Site Type
on the right? Good! (If field down and place it
you don't see it, under the Country
right-click the field. (Like we showed
PivotTable below and you on the previous
choose Show Field sheet).
List).

Country Site Type Sum - Subjects


France 109
GP 20
National Hospital 39
University 50
Italy 166
City Clinic 38
Clinic 62
National Clinic 34
Non-University 32
Spain 365
City Hospital 85
GP 10
National Hospital 70
Private Clinic 15
Private Hospital 25
University 160
UK 279
GP 42
Group Practice 36
Non-University 26
State Clinic 28
University 147
Total Result 919

Previous
GOOD TO KNOW
You can change the order of
the row fields to get a
different perspective on the
data.

TRY THIS
Display the subtotals for the
countries: click inside the
PivotTable, go to the
PivotTable Tools tab > select
Design > under Subtotals,
choose 'Show all Subtotals
at Top of Group'.

Next
If you need to simplify the PivotTable, you can collapse the data for the second row
and out of the way.

TRY THIS Country Site Type


Click the minus sign France
to collapse France's
data "up" and out of GP
the way. Then click National Hospital
the plus sign to University
bring it back again.
Italy
City Clinic
Clinic
National Clinic
Non-University
Spain
City Hospital
GP
National Hospital
Private Clinic
Private Hospital
University
UK
GP
Group Practice
Non-University
State Clinic
University
Total Result

Previous
ata for the second row field "up"

Sum - Subjects

20
39
50

38
62
34
32

85
10
70
15
25
160

42
36
26
28
147
919

Next
You can also collapse or expand the entire second row field, to simplify the PivotTa
more.

HERE'S THE KEY Country Site Type


Right-click France, and then France
click Expand/Collapse >
Collapse Entire Field. GP
National Hospital
To bring back the data, do
that again but click Expand University
Entire Field. Italy
City Clinic
Clinic
National Clinic
Non-University
Spain
City Hospital
GP
National Hospital
Private Clinic
Private Hospital
University
UK
GP
Group Practice
Non-University
State Clinic
University
Total Result

Previous
to simplify the PivotTable even

Sum - Subjects

20
39
50

38
62
34
32

85
10
70
15
25
160

42
36
26
28
147
919

Next
You can also have more than one column field. And those column fields can also be
or expanded.

TRY THIS
Click the minus sign next to GP, and the PI Names under GP (Dr. Black, Dr. Coral
and Dr. Silver) will collapse "up" and out of the way. Click the plus sign to bring
back the PI Names. (You can also collapse or expand the entire field like you did on
the previous sheet, by right-clicking.)

Sum - Subjects Site Type PI


GP Non-University
Country Black Coral Silver Olive Purple
France 38
Italy 72
Spain 48
UK 35 85
Total Result 35 48 38 72 85

Previous
umn fields can also be collapsed

er GP (Dr. Black, Dr. Coral


ick the plus sign to bring
he entire field like you did on

University Total Result


Orange Salmon Yellow
103 141
72
125 173
112 232
103 125 112 618

Next
Something to keep in mind: If you need more detail, it's possible to add many more r
or columns fields. In this example, there are three row fields.

First row field Country Site Type PI


France
Second row field
GP
Third row field Silver EXPERT TIP
University Just because you can add
fields, doesn't mean you s
Orange this example, it works fine
Italy sometimes too many field
Non-University their indentations, can ma
Olive PivotTable too complicate
people to understand.
Spain
GP
Coral
University
Salmon
UK
GP
Black
Non-University
Purple
University
Yellow
Total Result

Previous
add many more row fields

Sum - Subjects

XPERT TIP 38
st because you can add a bunch of
elds, doesn't mean you should. In
is example, it works fine. But 103
metimes too many fields, with all of
eir indentations, can make the
votTable too complicated for other 72
eople to understand.

48

125

35

85

112
618

Next
Quarter Country PI Site Type Subjects
Q1 Spain Coral GP 4 LOOK HERE
Q1 France Orange University 18 No need to read all the rows of da
the field names in the first row. Yo
Q1 Italy Olive Non-Universi 20 with these on the next sheet. Whe
Q1 UK Purple Non-Universi 35 scroll down and click Next.
Q1 UK Black GP 8
Q1 UK Yellow University 18
Q1 France Silver GP 9
Q1 Spain Salmon University 29
Q2 Spain Coral GP 10
Q2 France Orange University 26
Q2 Italy Olive Non-Universi 14
Q2 UK Purple Non-Universi 13
Q2 UK Black GP 12
Q2 UK Yellow University 35
Q2 France Silver GP 10
Q2 Spain Salmon University 31
Q3 Spain Coral GP 12
Q3 France Orange University 30
Q3 Italy Olive Non-Universi 16
Q3 UK Purple Non-Universi 22
Q3 UK Black GP 7
Q3 UK Yellow University 37
Q3 France Silver GP 7
Q3 Spain Salmon University 31
Q4 Spain Coral GP 22
Q4 France Orange University 29
Q4 Italy Olive Non-Universi 22
Q4 UK Purple Non-Universi 15
Q4 UK Black GP 8
Q4 UK Yellow University 22
Q4 France Silver GP 12
Q4 Spain Salmon University 34

Previous
OOK HERE
o need to read all the rows of data. Just look at
e field names in the first row. You'll be working
ith these on the next sheet. When you're ready,
roll down and click Next.

Next
Practice

We made the Do you see the In the field list, drag


1 PivotTable below
2 PivotTable Fields list on
3 the PI field to either
based on the previous the right? Good! (If you Rows or Columns so
sheet's data. Click don't see it, that you can answer:
anywhere inside the right-click the Who enrolled most
PivotTable below. PivotTable below and subjects in Q3?
choose Show Field
List.)

Sum - Subjects PI
Quarter Black Coral Olive Orange Purple Salmon
Q3 7 12 16 30 22 31
Total Result 7 12 16 30 22 31

Previous
4 Who enrolled most
subjects in Q3?

Pick one:
Yellow
You're right!

Silver YellowTotal Result


7 37 162
7 37 162

Next
Practice

Click anywhere inside Do you see the Now drag the fields
1 the PivotTable below
2 PivotTable Fields list
3 into place so that you
named Sum of on the right? Good! (If make a vertical
Subjects. you don't see it, PivotTable that has
right-click the Quarters on the left,
PivotTable and and the Countries
choose Show Field indented under the
List.) Quarters.

Quarter Country Sum - Subjects


Q1
France 27
Italy 20
Spain 33
UK 61
Q2
France 36
Italy 14
Spain 41
UK 60
Q3
France 37
Italy 16
Spain 43
UK 66
Q4
France 41
Italy 22
Spain 56
UK 45
Total Result 618

Previous
Good job! You placed a
secondary row field. Now
scroll down and click Next.

Next
Practice

Click anywhere inside Do you see the Now drag the fields
1 the PivotTable below
2 PivotTable Fields list
3 into place so that the
named Sum of on the right? Good! (If PivotTable shows
Subjects. you don't see it, each PI in its own
right-click the row, and each quarter
PivotTable and in its own column.
choose Show Field
List.)

Sum - Subjects Country


PI France Italy Spain UK Total Result
Black 35 35
Coral 48 48
Olive 72 72
Orange 103 103
Purple 85 85
Salmon 125 125
Silver 38 38
Yellow 112 112
Total Result 141 72 173 232 618

Previous
Good job! You placed
a row field on the left,
and a column field with
four new columns. Scroll
down and click Next...

Next
Practice

Click anywhere inside Do you see the This PivotTable is


1 the PivotTable below.
2 PivotTable Fields list
3 simply too wide.
on the right? Good! (If Drag the fields into
you don't see it, place so that you see
right-click the each country on the
PivotTable below and left, and the quarters
choose Show Field indented under each
List.) country.

Country Quarter Sum - Subjects


France 141
Q1 27
Q2 36
Q3 37
Q4 41
Italy 72
Q1 20
Q2 14
Q3 16
Q4 22
Spain 173
Q1 33
Q2 41
Q3 43
Q4 56
UK 232
Q1 61
Q2 60
Q3 66
Q4 45
Total Result 618

Previous
Good job! Now the data is
easier to read. Scroll down
and click Next...

Next
Practice

Click anywhere inside Do you see the Drag the fields into
1 the PivotTable below
2 PivotTable Fields list
3 position so that you
4
named Sum of on the right? Good! (If can see:
Subjects. you don't see it, • Each site type in its
right-click the own column field.
PivotTable below and • Quarters on the left
choose Show Field • Countries indented
List.) under the quarters.

Sum - Subjects Site Type


Quarter Country GP Non-University University Total Result
Q3
France 7 30 37
Italy 16 16
Spain 12 31 43
UK 7 22 37 66
Total Result 26 38 98 162

Previous
In Q3, how many subjects
4 were enrolled by University
hospitals in France?

Pick one:
30
You're right!

Next
Good job. Aren't PivotTables great?

But we encourage you to keep going! There's more to discover...

More Pivot info About refresh LinkedIn Learning Community


Discover more Read this Video courses for Connect with other
you can do by important article all levels—from Excel fans. They can
reading this about how to beginner to help you, and you
helpful article on refresh advanced. Take at can help them.
PivotTables. PivotTables. your own pace.

Learn more Learn more Learn more Learn more

Page 53 of 53

You might also like