0% found this document useful (0 votes)
59 views14 pages

Cheat Sheet Pivot Tables

Uploaded by

afoeze1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views14 pages

Cheat Sheet Pivot Tables

Uploaded by

afoeze1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Pivot Tables

Review in an instant
Cheatsheet for ”Pivot Tables”

Table of contents
Introduction 1
Starting to Pivot 2
- What is a Pivot Table and when should I use it?
- Making your data ready for a Pivot Table
- Building up the Pivot Table
- Rearranging the Pivot Table in seconds
- Change/refresh the data source

Configuration of your Pivot Table 5


- Selecting, moving, and deleting your Pivot Table
- Hide/Show elements
- Change the name and the column headers of your Pivot Table
- Pivot Table Layouts

Getting information from a Pivot Table 6


- Grand Totals and Subtotals
- Value Field Settings
- Summarizing more than one row/column
- Calculated fields
- See underlying data with Pivot Table Drilldown
- Use data from a Pivot Table in a formula

Sorting and Filtering your Pivot Table 8


- Sorting and Filtering
- Using rules for filtering
- Filtering with Slicers
- Filter multiple Pivot Tables with the same Slicer
- Report filters
- Grouping

Formatting your Pivot Table 10


- Pivot Table Styles
- General formatting
- Conditional Formatting

Pivot Charts 11
- What is a Pivot Chart?
- Create a Pivot Chart
- Using a Pivot Chart
- Sorting and filtering
Cheat sheet for ”Pivot Tables”

Introduction
This cheat sheet gives you a quick summary of all the content in “Pivot Tables”.

If you find yourself working with large amounts of data, you need to master pivot tables. “Pivot Tables”
covers everything you need to get started working with pivot tables. Mastering pivot tables is a huge step
towards mastering Excel.

This cheat sheet has multiple purposes.

Use it when faced with a specific challenge. Chances are, this cheat sheet will show you the steps on how to
solve your situation. For example, if you forgot what the “Raw” versus “Processed” data is, you can just look
it up. Or do you want to move your pivot table? We got you covered too.

Protip: Search in the PDF for the word you're looking for. Let's say you want to know, if this cheat sheet
covers "Sorting a pivot table". Then search for the word "Sort" and BAM, there it is on page 8.

Use this cheat sheet too when you want to review the content of this course. As time goes, you will forget a
few things here and there. We all do! This cheat sheet gets you back up to speed in no time.

Don't rush the lessons, take it at a nice, slow and steady pace. You'll soon surpass friends and colleagues.
One day, you'll also surpass your own wildest dreams of what you thought possible.

If you at any point have any questions, feel free to reach out to me: [email protected]

Cheers to your success!

Kasper Langmann
Co-founder
Certified Microsoft Office Specialist

1
Cheat sheet for ”Pivot Tables”

Starting to Pivot
What is a Pivot Table and when should I use it?
A Pivot Table is the ultimate tool for making sense of big datasets and turns data into insightful
reports.
The key benefits of a Pivot Table are its extreme flexibility and unparalleled speed when making
reports.
Reports turn large datasets into smaller ones that tell the users exactly what they need to know
instead of something else. That means that Pivot Tables help you take action from datasets and
transform the data into business decisions.

Making your data ready for a Pivot Table


Data comes in two forms:
Raw and processed.
Raw data fits well into a Pivot Table and makes you able to use a Pivot Table to its full potential.
But processed data has been manipulated with (and mostly, data has been removed from it)
which makes your Pivot Table ineffective.
This is an example of perfect data for a Pivot Table:

This data is perfect because the data is separated vertically in the different order numbers but
each cell in a row belongs together horizontally. Each new row with data is considered an ‘entry’
about a specific order.
This is called a Table and when in this state data is perfect for a Pivot Table. If the data is not like
this in any way, you should strive to change it.

2
Cheat sheet for ”Pivot Tables”

Building up the Pivot Table


Insert your Pivot Table:
1. Select a cell in your data.
2. Go to the ‘Insert’ tab and click the ‘PivotTable’ button.
3. Check if Excel has selected your data correctly.
4. Choose where you want your Pivot Table and click ‘OK’.
After this, select the empty Pivot Table and look to your right and see the ‘Field List’.
The top half of the ‘Field List’ is filled with the columns from your original data that is now
called ‘Fields’.
These ‘Fields’, you can drag into the different ‘areas’ of the Pivot Table below, thus arranging the
Pivot Table a certain way.
The more ‘Fields’ you drag into it the more depth is
added to your Pivot Table.
1. This area is for Report Filters, which I’ll get into
later.
2. The ‘Columns area’ is for the fields you want to
set up horizontally in your Pivot Table. This is
mostly for units of time.
3. The ‘Rows area’ is for the fields you want to set
up vertically in your Pivot Table. This area is used
a lot more than the ‘Columns area’ and is for
anything but units of time.
4. The ‘Values area’ is the most important area of
the Pivot Table ‘Field List’. It controls which data
is summarized and how it is displayed. Most
numbers should go into this area.

3
Cheat sheet for ”Pivot Tables”

Rearranging the Pivot Table in seconds


The beauty of a Pivot Table is, that when you’ve dragged the fields into the different areas of the
Pivot Table, thus creating a report, you can change it completely in a matter of seconds.
1. Drag new fields from the ’Field List’ to the areas to add more depth to the Pivot Table.
2. Drag existing fields out of the areas and drop them to remove the fields from the Pivot
Table.
3. Exchange place of existing fields between the areas to make the Pivot Table tell you
something different.

Change/Refresh the data source


The data that you create the Pivot Table from is called the source.
When the source data changes, you need to update your Pivot Table or the changes won’t be
reflected. A change in the source data can be caused by data being added or removed from the
original source data.
To include added data:
1. Select a cell in the Pivot Table.
2. Go to the ‘Analyze’ tab.
3. Click ‘Change Data Source’.
4. Select the new source and click ‘OK’.
To refresh current data, simply right-click a cell in your Pivot Table and click ‘Refresh’.

4
Cheat sheet for ”Pivot Tables”

Configuration of your Pivot Table


Selecting, moving and deleting your Pivot Table
For fast selection of labels Move your Pivot Table: Delete your Pivot Table:
or values in your Pivot
1. Select a cell in the 1. Use the ’Select’
Table:
Pivot Table. button to select the
1. Select a cell in the 2. Go to the ‘Analyze’ entire Pivot Table.
Pivot Table. tab. 2. Press the ‘Delete’
2. Go to the ‘Analyze’ 3. Click the ‘Move button on your
tab. PivotTable’ button keyboard.
3. Click the ‘Select’ and choose where
button and choose you want your Pivot
what you want to Table to be moved
select. to.

Hide/Show elements
When you have records that belong to a certain category, you can
choose to hide these items and only see the subtotal for that
category. This happens when you have two or more items in the
‘Rows area’ or ‘Columns area’.
Click the ‘minus’ to collapse the category. This will change it to a
‘plus’. Click the ‘plus’ to expand the category.
To expand/collapse all categories at once:
1. Right-click an item
2. Hover over ’Expand/Collapse’
3. Click either ’Expand Entire Field’ or ’Collapse Entire Field’.

Change the name and the column headers of your Pivot Table
To change the headers anywhere in your Pivot Table just select it and write whatever you want.
It will stay with the Pivot Table, even when you rearrange it.
The name of a Pivot Table is used for advanced purposes. Change it on the left side of the
‘Analyze’ tab on The Ribbon. Always choose a name that reflects what’s in the Pivot Table.

Pivot Table Layouts


The default form of a Pivot Table is called ‘Compact form’. In the ‘Design’ tab, in ‘Report
Layouts’, you can change this to ‘Outline’ or ‘Tabular’ form, which are better for when you need
to export your Pivot Table into some other program or database. If that’s not the case, definitely
go with the default.

5
Cheat sheet for ”Pivot Tables”

Getting information from a Pivot Table


Grand Totals and Subtotals
Grand Totals and Subtotals are important for your Pivot Table
because it’s difficult to make sense of data that is not summarized.
You can toggle Subtotals on/off in the ‘Design’ tab with the options
within the ‘Subtotals’ button.
You can toggle Grand Totals on/off in the ‘Design’ tab with the
options within the ‘Grand Totals’ button.

Value Field Settings


If you want to see something else than the sum of the field you put into the ‘Values area’ in the
‘Field List’, you go to the ‘Value Field Settings’.
1. Click the little arrow next to the ‘Value field’.
2. Click ’Value Field Settings’.
3. Choose another function for your values. It could be ‘Average’.
4. Click ‘OK’.
Another great use of the ‘Value Field Settings’ is the ‘Show Values As’
tab (replacing step 3 and 4). From here you can choose to display the
values as a calculation of something, preferably as a percentage of
one of the totals.

Summarizing more than one column


Drag more than one field into the ‘Values area’ to summarize more than one column
If you don’t have more than one field appropriate to be a ‘Value field’ then you can use two (or
more) instances of the same field to great benefit.
1. Drag the same ’Value field’ into the ’Values area’ again.
2. Click the little arrow next to it and select ‘Value Field Settings’.
3. Choose another function for your ‘Value field’. By default, this is the sum so change it to
something else (like average, for example).
4. Now your Pivot Table shows both the sum and the average of your value field!

6
Cheat sheet for ”Pivot Tables”

Calculated Fields
Calculating something in a Pivot Table can be done with a Calculated Field. This is basically just
a field you create to carry out a calculation and drag around in your Pivot Table, but without
adding anything to the source data.
1. Go to the ’Analyze’ tab.
2. Click ‘Fields, Items & Sets’ and choose ‘Calculated Fields’.
3. Create the formula for your calculation by inserting the fields you need and manually
typing the rest. You can use functions in this calculation.
4. Click ‘Add’ when the formula is done. Then click ‘OK’.
Disadvantages:
The calculation you construct is also carried out within the subtotals and grand totals. This
makes them show the wrong results depending on your calculation.
You can’t use text within a function in the calculated field. You can use functions, but if you try
making an IF function and use text in your criteria like this, the field will not work.
Advantage:
You can include most calculations without filling up your source data with new columns for
calculations.

See underlying data with Pivot Table Drilldown


Double-click any value, subtotal or grand total, to see exactly which records that make up the
given value. The records will be presented in a new sheet in the workbook and can be used in
further calculations or when you need a very deep level of understanding of some data.

Use data from a Pivot Table in a formula


You can create references to cells in your Pivot Table but these references are different from the
standard “=A2+A5” references you’re used to.
When you start a formula in a cell and then click a cell in the Pivot Table the GETPIVOTDATA
function in inserted instead of your reference. This function helps you retain your references
when the Pivot Table is rearranged.
You don’t need to do anything with this function because it automatically created by Excel when
you try to refer to a cell within a Pivot Table.
Keep in mind that the GETPIVOTDATA only returns data that is visible. That means that when
you rearrange your Pivot Table the cell you refer to must still be visible or the reference (built by
the GETPIVOTDATA function) will return an error.

7
Cheat sheet for ”Pivot Tables”

Sorting and filtering your Pivot Table


Sorting and filtering
Whenever you have more than a handful of records in an Excel sheet the
option of filtering and sorting becomes very important.
Click the filter button next to the row or column labels to sort and filter.
1. Use the checkmarks to tell Excel which items you want to be
visible.
2. Use these buttons to sort the data.
3. If you have multiple fields in the given area (for example,
three fields in the ‘Rows area’) you can choose which of the
fields you want to sort or filter.
You can also sort values in your Pivot Table.
Right-click any value and hover your mouse over ‘Sort’. Choose how
you want to sort the values.

Using rules for filtering


Rules are filters that automatically takes care of the individual items that you don’t want to see.
The only thing you have to do is to give the filter a certain criterion. For example, “I only want to
see values above 400,000.”
To do this, right-click on any of the items (not values) in the Pivot Table and hover your mouse
over ‘Filter’.
Select ‘Value Filters’ and type your criterion (for example, ‘Sum of Salary’ + ‘is greater than’ +
400,000.
Select another type of filter depending on what you want to filter on. Label filters are for text (for
example, all labels/items that contain a certain word). Date filters are for dates (for example, all
records after 2nd of November 2016).

Filtering with a Slicer


A Slicer is a tool you can use for easy filtering of your Pivot Table
and saves the users a bunch of time when using the same filters over
and over again.
1. Select your Pivot Table.
2. In the ’Analyze’ tab, click ’Insert Slicer’
3. Choose which Pivot Table field the Slicer will filter on and
click ‘OK’.

8
Cheat sheet for ”Pivot Tables”

Filter multiple Pivot Tables with the same Slicer


If you have multiple Pivot Tables based on the same source data then, if they have at least one
visible field in common, you can use the same Slicer to filter them all.
1. Select your Slicer.
2. In the ’Options’ tab (new tab under ’Slicer Tools’) click ’Report Connections’.
3. Choose the other Pivot Tables and click ‘OK’.

Report Filters
A Report Filter is another way of filtering and I suggest you use it for
important filters that other users of your Pivot Table has to use frequently.
The advantage of using a Report Filter is that you don’t have to include the
actual field in the Pivot Table itself. This makes the filter simpler to use and
keeps your Pivot Table neat and clean-looking.
Simply drag the fields you want to filter this way into the ‘Filters’ area in the
‘Field List’. The filter now appears right above the Pivot Table.

Grouping
Grouping is for ‘creating’ your own categories in the Pivot Table if a category doesn’t exist in the
‘Field List’ or source data.
If you need a group (category) simply select the items you want to group together, right-click
and click ‘Group’.
Now, all the data in column looks very confusing. Excel has tried to create similar groups for all
other items, but it rarely does a good job.
Think of some categories for your data and type the first one into the cell that says ‘Group 1’.
Now, select some more items, right-click and click ‘Group’. Type in the next category name into
the cell that says ‘Group 2’.
Repeat until every item has a category.
You can use this new field like a normal field, which means that when you remove it from the
active fields, the groups are saved and can be used again later on.

9
Cheat sheet for ”Pivot Tables”

Formatting your Pivot Table


Pivot Table Styles
This is the easiest way to style your report.
You want to avoid putting too much color in your Pivot Table, as it will defeat the purpose of
getting a quick and easy overview of data.
Therefore, I suggest you use the styles in the ‘Medium 8 through 21’ interval. I find that these
styles look the most professional and does not confuse the user in terms of separating subtotals,
grand totals, headers and data.
Select the Pivot Table and choose one of the styles from the ‘Design’ tab.

General formatting
Formatting is a lot different in a Pivot Table than in a standard sheet.
For example, if you change the fill color of a cell and rearrange something in the ‘Field List’. If
these changes have any effect on the cell you’ve formatted the formatting will disappear. So don’t
try to format your Pivot Table with color, bolding, borders or similar.
Luckily, you can still do number formatting.
1. Click the little arrow in the ’Value Field’.
2. Go to ‘Value Field Settings’.
3. Click the ‘Number Format’ button.
4. Choose your format and click ‘OK’.

Conditional Formatting
To apply Conditional Formatting to a Pivot Table, simply select one cell with values. Then, create
the Conditional Formatting rule as you normally would. After you’ve created the rule a small
button appears. See module 6 of our course ‘Formatting’ if you don’t know how to use
Conditional Formatting.
Click it and choose the last option, which makes sure that the rule only applied to the relevant
cells. For example, you don’t want to highlight totals with a Conditional Formatting rule.
This way, when the Pivot Table is
rearranged, the Conditional
Formatting Rule will not get
messed up.
This method does not work when
applied rules to anything else than
values.

10
Cheat sheet for ”Pivot Tables”

Pivot Charts
What is a Pivot Chart?
A Pivot Chart is a way to visualize your Pivot Table data and is an improvement over normal
charts.
It is a chart that you attach to your Pivot Table to get the same benefits that a Pivot Table has:
extreme flexibility and speed.
Below, I’ll teach you how to use a Pivot Chart.

Create a Pivot Chart


To insert a Pivot Chart.
1. Select your Pivot Table.
2. In the ’Analyze’ tab, click ’PivotChart’.
3. Choose your chart and click ‘OK’.
Basic Charts
The Line chart is great for displaying trends in the data and categories when the order of these
categories are important.
The Column Chart is very good at comparing values across categories when the order of these
categories are not important.
The Pie Chart is for displaying proportions of a whole and should not be used if you have a lot of
categories.
Recommended:
The more complex the chart, the more time it takes for the user to understand. The output of a
Pivot Table makes the Column Chart very easy to read for everyone.

11
Cheat sheet for ”Pivot Tables”

Using a Pivot Chart


Using a Pivot Chart is the same as using a Pivot Table.
When you select the Pivot Chart, you have the ‘Field List’ to the right which is identical to the
one you used in the Pivot Table. The difference is that what before was the ‘Rows area’ is now
called the ‘Legend’.
The ‘Columns area’ is now called the Axis and is the horizontal axis (depending on the chart
type).
The ‘Values area’ is now displayed by the vertical axis in the chart (depending on the chart type).

To rearrange the Pivot Chart, just drag the fields around the Field List like you’re used to.
Changes made to the Pivot Chart is automatically applied to the Pivot Table as well.

Sorting and filtering


Sorting and filtering are some of the
features that make Pivot Charts so great.
See the picture to the right how to sort and
filter the labels/categories in the Pivot
Chart.
To sort or filter on the values, right-click
one of the columns and hover your mouse
over either ‘Sort’ or ‘Filter’.

12

You might also like