You are on page 1of 32

PivotTables in Excel

MICHELLE ANGELIE B. PUYAT


Project Development Officer, DRMD-DRIMS

June 2021 | DSWD FO2


MODULE 2

PivotTables
• PivotTables are dynamic, summary reports
• It allow you to look at the same information in different
ways with just a few mouse clicks
• Data swings into place, answering questions, telling you
what the data means
• PivotTables allow you to quickly take huge amounts of
data and turn it into small, concise reports that tell you
what you need to know
MODULE 2

PivotTables
MODULE 2

Preparing Data for a PivotTable


• Be sure to have a header row as the first row in the
worksheet. The titles for each column will become the
field names in the PivotTable.
• Each column should contain similar data, for example,
just numbers, dates, text. For a column that contains text
should not also contain numbers and dates.
• Remove empty rows and columns.
MODULE 2

Preparing Data for a PivotTable


MODULE 2

Creating a PivotTable
• Once you have prepared the data,
1. Place the cursor anywhere in the data range or select the data
you want to use in the PivotTable.
2. On the Insert tab, in the Tables group, click PivotTable.
MODULE 2

3. The Create PivotTable


dialog box opens. The
Table/Range box shows
the range of the selected
data (based on what you
selected in Step 1). Select
the desired location of
the PivotTable – either
New Worksheet or
Existing Worksheet. Click
OK when finished.
MODULE 2

4. The worksheet
now shows the
layout for the PivotTable
PivotTable Layout
field list, which
shows the area Field
column titles List

from the
source data.
5. The PivotTable is created by moving fields from the Field List to the layout
area. What you drag where depends on what question you are trying to
answer. This can be don in four ways:
a. Select the check box next to the field name. Excel will automatically put
the field in place.
i. Non-numeric fields are automatically placed in Row Labels on the
left side of the report. As you add more non-numeric fields, Excel
places them on the inside of fields already on the PivotTable report,
building a hierarchy.
ii. Numeric fields will be place in Column Labels
b. Right-click a field name and select the desired location of the field.
c. Drag the field name to the locations listed below the field list.
d. Drag the field name directly to the layout area. This is how PivotTables
were created in previous versions of Excel.
MODULE 2

6. Please note that if you click in a cell outside of the layout are, the
PivotTable Field List goes away. To get the field list back, click inside the
PivotTable layout area.
Add fields
Drag the Sales field
to the Values area.

Grand
Total of
all Data
Drag the Color field
to the Rows area.

Excel breaks out


sales by Color. You
can see Blue is the Grand
top seller, while Red Total of
comes in last:
all Data
Number formatting
Pivot Tables can apply and maintain number
formatting automatically to numeric fields. This is a
big time-saver when data changes frequently.

1. Right-click any Sales number and choose


Number Format
2. Apply Currency formatting with
zero decimal places, the click OK:
In the resulting pivot table, all sales
values have Currency format
applied:
Sorting by value
1. Right-click any Sales value and choose
Sort > Largest to Smallest.
Sorted from Largest to
Smallest
Excel now lists top-selling colors first. This
sort order will be maintained when data
changes, or when the pivot table is
reconfigured.
Refresh data
Pivot table data needs to be "refreshed" in order to bring in updates. To reinforce how this
works, we'll make a big change to the source data and watch it flow into the pivot table.
1. Select cell E2 and change $11.00 to $2000.
2. Right-click anywhere in the pivot table and select "Refresh".
Notice "Red" is now the top selling color, and automatically moves to the top:

Red moves to
the top as the
best-selling
color

3. Change E2 back to $11.00 and refresh the pivot again.


Second value field
You can add more than one field as a Value
field.

1. Drag Units to the Value area to see Sales


and Units together:
Second value field
You can add more than one field as a Value
field.

1. Drag Units to the Value area to see Sales


and Units together:
Percent of total
There are different ways to display values.
One option is to show values as a percent of
total. If you want to display the same field in
different ways, add the field twice.
1. Remove the Units from the Values area

2. Add the Sales field (again) to the Values


area.

3. Right-click the second instance and choose


"% of grand total":
The result is a breakdown by color along with
a percent of total:

Second Sales field


displays % of total
Group by date
Pivot tables have a special feature to group
dates into units like years, months, and
quarters. This grouping can be customized.

1. Remove the second Sales field (Sales2).


2. Drag the Date field to the Columns area.
3. Right-click a date in the header area and
choose "Group":
Right-click a date,
select group
4. When the Group window appears, group by
Years only (deselect Months and Quarters):
We now have a pivot table that groups sales by color and year:

Notice there are no sales of Silver in 2016 and 2017. We can guess that Silver was introduced as a new color
in 2018. Pivot tables often reveal patterns in data that are difficult to see otherwise.
Two-way Pivot
Pivot tables can plot data in various two-
dimensional arrangements.

1. Drag the Date field out of the columns area


2. Drag Region into the Columns area.

Excel builds a two-way pivot table that breaks


down sales by color and region: Two-way pivot
table, Color by
Region
3. Swap Region and Color (i.e. drag Region to
the Rows area and Color to the Columns area).

Excel builds another two-dimensional pivot


table:

Two-way pivot
table, Region by
Color
Excercise
Determine the number of IDPs still inside the
evacuation centers open with sex and age
disaggregation.

With age and sex


disaggregation
THANK YOU!
VISIT US AT OUR VIRTUAL OPERATIONS CENTER:
DROMIC.DSWD.GOV.PH

You might also like