Uploaded by C Venkata Satyanarayana

Excel Pivot Tables & Introduction To Dashboards. The Step-By-Step Guide ( PDFDrive )

advertisement
M
i
C
»
I
r
f
T
a
V4
T
h
b
\
e
s
%
e
S
t
f
e
p
-
B
y
M
n
e Sp
G
^
t
r
o
d
U
u
i d
e
C
t
l 0
n
r
m o n t h -y r Q
REGIONS Q
Central
East
West
\
|
Sun-2017
TTL
993І
97 2\
I
TOTAL
Jul-2017
♦/-
TTL
m
я
Sep-2017
TTL
♦/-
♦/-
к
ш
л
к
ш
і Я И Й 5 Э П И И 9 Е І!
ШШШЕ5И^ШШЁ2Яі Ш Ч З Э Г Ш И Е І Э И ШШЖШШЖ
И К Ш Г ^ К Б
шшшжшшшм
9 1 l\
2,876
2,915
TOP 10 PARTS SOLO Q
CATEGORY Q
о Fire Protection
Aug-2017
♦/-
POWER
2,844
1.4%
QTY SOLO
%
-2.4%
2,919 1
2.6
% of Sa\es by Region
Н И Е Э И
ШШЕЗЗШШШі
о Auxiliary Structure
WANG
©Engine Struts
WING
о Digital fuel Flow System
о fu e l Dump Fuel Hose
fUEL
fUEL
flH E E E M H ll
|
E 3 I
о Wing W ebs
WING
Ш
о Boost Pumps
FUEL
И
о Keel Beam
STRUC
STRUCTURAL
В
Е
З Я
В Я Д иЙ
E 3 1 B
e Engine Lubrication System FUEL
о Fuel Pressur e Indicating
FUEL
100 .0%
TOTAL
QUANTITY
CATEGORY И
REGIONS Q
FUEL
Central
f
East
|І Ю
West
TOTAL
|
c J. Benton
М
POWER
STRUCTURAL
1.646 \
1,654 \
Ш
И
1.47S \
Ш М
1.675 \
4,7OS
4,997
407 \
І
WING
TOTAL
41S \
497 \
1.965 \
1.S93 \
1.724 \
5,672 1
5.556 1
1317
5,582
16,599
5.3711
Excel® Pivot Tables & Introduction To
Dashboards
The Step-By-Step Guide
C.J. Benton
Copyright © 2017 C.J. Benton
All rights reserved.
N o part of this publication may reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, photocopying, recording, scanning, or otherwise without signed permission from the author, except for the use of brief
quotations for review purposes.
Limit Of Liability / Disclaimer Of Warranty: While the author has used their best efforts in preparing this book, they make no
representations or warranties with respect to the accuracy or completeness of the contents of this book. The author does not
guarantee the reader’s results will match those of the author. The advice and strategies contained herein may not be suitable for
your situation. The author is not engaged in offering financial, tax, legal or other professional services by publishing this book. You
should consult a licensed professional where appropriate. The author shall not be liable for any errors or omissions, loss of profit or
any other commercial damages including but not limited to special, incidental, consequential, or other damages.
T rad em a rk s: Microsoft and Word are either registered trademarks or trademarks of Microsoft Corporation in the United States
and/or other countries.
Thank you!
Thank you for purchasing and reading this book! Your feedback is valued and
appreciated. Please take a few minutes and leave a review.
Other Books Available By This Author:
1. Microsoft® Excel® Start Here The Beginners Guide
2. The Step-By-Step Guide To The 25 Most Common Microsoft® Excel®
Formulas & Features
3. The Step-By-Step Guide To Pivot Tables & Introduction To Dashboards
(version 2013)
4. The Step-By-Step Guide To The VLOOKUP formula in Microsoft®
Excel®
5. The Microsoft® Excel® Step-By-Step Training Guide Book Bundle
6. Excel® Macros & VBA For Business Users - A Beginners Guide
7. Microsoft® Word® Mail Merge The Step-By-Step Guide
Table of Contents
CHAPTER 1
H ow To Use This Book
CHAPTER 2
Introduction To Pivot Tables
What Are Pivot Tables?
What Are The Main Parts Of A Pivot Table?
CHAPTER 3
Building A B asic Pivot Table & Chart
Summarizing Numbers
H ow To Drill-Down Pivot Table Data
Adding Additional R ow s (categories) To Your Pivot Table
Charts - H ow To Create A Basic Pivot Table Chart
CHAPTER 4
Displaying Percentages
CHAPTER 5
Ranking Results & Displaying A verages
Displaying Averages
Ranking Data
CHAPTER 6
Slicers (interactive analysis) & A dvan ced Filtering
Timeline Slicer
Slicer
A dvanced Filtering
CHAPTER 7
Introduction To Dashboards
Adding Multiple Pivot Tables To A Worksheet
Formatting The Dashboard
Adding Charts To The Dashboard
CHAPTER 8
A dding Slicers and Perform ance Symbols To Your Dashboard
Slicers
Performance Symbols (up/down arrows and other indicators)
CHAPTER 9
Refreshing Pivot Table and D ashboard Data
C H A P T E R 10
Protecting Your Dashboard
Hiding Your Pivot Table Source Data
Protecting The Dashboard Or A ny Other Worksheet
C H A P T E R 11
Grouping Pivot Table Data
Grouping Records
Count Function
C H A P T E R 12
Calculated Fields In Pivot Tables
Adding A Basic Calculated Field
Changing The Display Of Formula Error M essages
Removing Or Changing Calculated Fields
Inserting Logic Fields (if...then)
C H A P T E R 13
Creating Pivot Tables From Im ported Files - using the D ata M odel
C H A P T E R 14
Troubleshooting: Pivot Tables D isplaying D uplicate Values
Formula - LEN
Formula - TRIM
C H A P T E R 15
Troubleshooting: H ow To R esolve Common Pivot Table Errors
A M e s s a g e Fr o m Th e A u t h o r
CHAPTER 1
How To Use This Book
This book can be used as a tutorial or quick reference guide. It is intended for users who are
comfortable with the basics of Microsoft® Excel® and are now ready to build upon this skill by
learning Pivot Tables and Dashboards.
This book assumes you already know how to create, open, save, and modify an Excel®
workbook and have a general familiarity with the Excel® toolbar (Ribbon).
All of the examples in this book use Microsoft® Excel® 2016, however most of the
functionality and formulas can be applied with Microsoft® Excel® version 2013.
All
screenshots use Microsoft® Excel® 2016, functionality and display will be slightly different if
using Excel® 2013.
While this book provides several basic and intermediate Pivot Table examples, the book
does not cover ALL available Microsoft® Excel® Pivot Table features, formulas, and
functionality.
Please always back-up your work and save often. A good best practice when attempting
any new functionality is to create a copy of the original spreadsheet and implement your
changes on the copied spreadsheet.
Should anything go wrong, you then have the original
spreadsheet to fall back on. Please see the diagram below.
Diagram 1:
This book is structured to build on each previous chapter’s teaching.
Chapters
X
Chapters
г-з
Pivot Table
fundamentals
\
4
4 -6
\
Apptymg averages,
J
percentages.
rankings and slicers
)
X
Chapters
7-10
Basic D ashboard
cre a tio n form attin g, &
file m a n a g e m e n t
B e g in n e r
Л
у
Chapters
11 - 1 2
Chapter
Grouping records and
inserting і :ніі:ііін Г(і і ]
(ieMs
..
S.
Creating Pivcrt
Tables from
imported files
13
Interm ediate
FILES FO R EXERCISES
The exercise files are available for download at the following website:
http://bentonexcelbooks.my-free.website/excel-2016
CHAPTER 2
Introduction To Pivot Tables
What Are Pivot Tables?
Pivot Tables are a feature within Microsoft® Excel® that takes individual cells or pieces of data
and lets you arrange them into numerous types of calculated views.
These snapshots of
summarized data require minimal effort to create and can be changed by simply clicking or
dragging which fields are included in your report.
By using built-in functions and filters, Pivot Tables allow you to quickly organize and
summarize large amounts of data. You can filter and drill-down for more detailed examination of
your numbers and various types of analysis can be completed without the need to manually enter
formulas into the spreadsheet you’re analyzing.
For example, the below Pivot Table is based on a detailed spreadsheet of 3,888 individual
records containing information about airplane parts. In less than 1 minute, I was able to produce
the following report for the quantity of parts sold by region:
L
A
&
C
D
E
F
G
H
l
l
K
L
M
12
i 3 Sumof QTY SOLD Column iabelb ’ Jan
14 ROWlabels
Feb Mar Apr May Jun Jul дне Sep act NOV Dec Grand Total |
|s Centra!
393 569 865 Я72 i'J- S6S 373 369 373 569 1031 372
37S3 1
16 East
520 596 821 SAG 5Э6 321 346 321 S46 536 1Q37 346
3592 !
Я І
It West
912 sea 781 И 2 5SS 783 322 733 823 53S w 322
2725 1751 2464 2540 1753 2465 2540 2473 2540 1753 3117 2540
23*721
13 Gгdud Totil
This quick summary can also be formatted to improve readability. However, formatting
does require a little more time to complete.
In today’s world where massive amounts of information is available, you may be tasked
with analyzing significant portions of this data, perhaps consisting of several thousand or
hundreds of thousands of records.
You may have to reconcile numbers from many different
sources and formats, such as assimilating material from:
1. Reports generated by another application, such as a legacy system
2.
Data imported into Excel® via a query from a database or other application
3.
Data copied or cut, and pasted into Excel® from the web or other types of screen
scraping activities
4.
Analyzing test or research results from multiple subjects
One of the easiest ways to perform various levels analysis on this type of information and more is
to use Pivot Tables.
What Are The Main Parts Of A Pivot Table?
Before we begin our first exercise, let’s review the three main components of a Pivot Table:
1.
Rows: The rows section typically represents how you would like to categorize or group
your data. Some examples include: employee name, region, department, part number etc.
2.
Columns: The columns show the level or levels in which you’re displaying your
calculations. Often a time period such as month, quarter, or year, but can also be
categories, product lines, etc.
3.
Values: Values are the calculation portion of the report, these figures can be sums,
percentages, counts, averages, rankings or custom computations.
Level of
Calculation
QUARTER О
C ^u y
■
Q tfl
Central
Т 3 2 7 _ '’ гГзоб" "2,613 ''~2,Ъ22~ " ' э ' г а з ' !
East
q tr2
QtrJ
Qtr4
lotd!
fl
2,337
2,263
2,513
2,479
9,592
W est
2.2B3
2,193
2,427
2,409
9,312__ J
[Total
6,947
6,762
7,410
2І,ЫІ Ц
—
C«tc
CHAPTER 3
Building A Basic Pivot Table & Chart
In this chapter we will review the fundamental steps of creating and modifying a Pivot Table.
Here we will take a basic spreadsheet containing fruit sale information and:
1.
Determine the total sales by region and quarter
2.
Create a chart that displays the sales by region and quarter
3.
Display the individual fruit sales by region and quarter
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel- 2016
FruitSales.xlsx
Summarizing Numbers
Sample data for chapters 3 - 5 , due to space limitations the entire data set is not displayed.
!
A
Я
E
SALES PLRWN
NH :■! IV
FIRST ЫАМГ
! 2 OnlMl
Bat
1 3 Cenlnl Helen
i a i enirjl UK
| S Central Sally
i6
Central
| 1 tssr
I Я 1.1»
Sam
! ч Eiit
AWrey
John
Joftn
1 .0 f j -.i
i l l Etft
Мату
Sarah
12 west
Ale»
ИЗ Wen
! 14 w eit
Silly
Hei«n
|
Wert
| 6
Jack
117 WhjI
i
cer,;ral
Н»
Peter
BCD
115 [Сеп7га|і Helen
i
West
Joe
Peier
[ 65 /.'H i
c
D
SA U 5PIR 504
LAST WUUF
W IE 5PIR S04
Е
F
G
W AR ПК
H
ORANfjLS MAHGCJ5
IP
tOTAl
Taytor
5ml! h
1174
1
1,310
5,620
1
102
2,039
354
1,771
азз
59
516
fohnson
M am *
ля
ш
1
1
93
595
иг
B24
Better
Williams
an
1
№
469
1,975
2,779
«0
153
хю
1
г
346
НО
1.092
237
w
556
324
343
1
JBfr
240
19!
115
600
і
J1S
900
1000
1
1
Ж
Ш
ИМ
:
ітэ
234
Я17
100
400
1
1
m
193
14}
122
134
Dcwer
wihon
Taylor
ifeiiet
Winchester
SHTifMOfi
imirh
Taniwr
ill
17Я
iW
215
26J
212
236
295
127
140
633
646
766
J27
502
11*
532
457
ISO
Й7
96
343
377
■ІА5
Grihjm
ТОО
1
1
175
105
Taytor
Smith
117*
2
113
330
65
567
333
400
2
t
л
1 ,0 »
2.ЯЗЗ
1,391
2 ,sa 6
Э40
2,796
l r3J6
Я.5І6
4,392
4.473
4,334
13,199
Tanner
Grjham
ТОО
First we will determine the 'to tal sales by region’ and then we will build upon this by adding the
‘quarterly sales by region’:
1. Open the FruitSales.xlsx spreadsheet and highlight cells A1:I65
2. From the Ribbon select INSERT : PivotTable
File
□ raw
Home
P i'-o tT a b le R e co m m e n d e d
Table
Page Layout
P ictu re s
Tables
O n lin e
P ictu re s Й +
PivotTables
Illu stra tio n s
The following dialogue box should appear:
Create P ivo tT a ble
?
X
Choose th e data th a t you w a n t to analyze
®
Select a ta b le o r range
Table/Range:
Sheet1!SAS1:SISS5|
■.. ■Use an external data source
Choose C onnection...
C o n n e ction name:
Use th is w o rk b o o k 's Data M o d e l
Choose w h e re you w a n t th e PivotTable re p o rt to be placed
®
N ew W o rksh e e t
Q Existing W o rksh e e t
Location:
Choose w h e th e ry o u w a n t to analyze m u ltip le tables
j~ l Add th is data to th e Data M od e l
OK
Cancel
3. When prompted, verify the 'New W orksheet’ radio button is selected
4.
Click the 'O K ’ button
A new tab will be created and appear similar to the following. Note: the ‘PivotTable Fields’
pane on the right side o f the new worksheet.
Н
'
File
Hom e
0 1st □ Н t - *
I
I
nw-<t
fra *
P * g f I л у о і*
F*wmg*»s.
hwiSAMfe- bsrf
Dau
P a^ai
V i^w
D*v«te>p*f
л
ffi
-
□
3 « jq n
U Tcfl лпр
X
Next, w e’ll “categorize” our report and select a calculation value.
5.
Inside the PivotTable Fields pane click the ‘REG IO N ’ box or drag this field to ‘Rows’
section.
6.
Inside the PivotTable Fields pane click the ‘TOTAL’ box or drag this field to ‘£ Values’
section.
Please see image below, for an illustration o f steps #5 & #6
PivotTab le Fields
C h c & te f ie l d s 1о a d d t o t€$ с n
\s AL<jiON
□ SALESPERSONF'RSTJ-UMf
□ SALE*PEK53NLAST?;АГ,ГЕ
□ SALESPERSONС
□ QUAKTFH
□
APPLES
П OHANOtJ
□ MANGOS
0
101A1
DragftekHbftwttri *пл%hetew
T Filtcro
I
5" Rcwi
REGION
Сокл
i
-
VllttB
Sum <rf TOTAL -
D eftr Layout Update
The following should be displayed on the left side of your screen Note: the format is not very
easy to read.
_______________________
7.
3
Row la b els
4
Central
;5um o f TOTAL
138571,3795
5
East
1455S7.96S9
6
W est
196786,7115
7
Grand Total
480946.OSW
We can change the column labels and format of the numbers. In the below example:
1.
2.
Select cell ‘A3’ and change the text from ‘Row Labels’ to ‘REG IO N ’
Select cell ‘B3’ and change the text from ‘Sum of TOTAL’ to ‘TOTAL
SALES’
3.
You may also change the currency format in cells ‘B4:B7’. In the below
example, the format was changed to U.S. dollars with zero decimal places
Below is the formatted example:
A
В
1
2
3 REGION
4
- TOTAL SALES
Central
S
138,571
5 East
$
145,588
6 West
$
196,787
7 Grand Total
$
480,946
To enhance the report w e’re going to going add Quarter columns. This “level” dimension will
provide greater detail of the total fruit sales.
8.
Inside the PivotTable Fields pane drag the ‘QUARTER’ field to the ‘Columns’
section.
Note: Excel® is reading the Quarter value as numeric, therefore if you click, instead of
dragging the field to the ‘Columns’section Excel® will apply a calculation.
I f this happens click the drop-down-box o f ‘Sum o f QUARTER’ in the ‘^ Values’ section and
select the option ‘Move to Column Labels’
We now have ‘QUARTER’ added to the summary
9.
Select cell ‘B3’ and change the text from ‘Column Labels’ to ‘BY QUARTER’
10. The labels for cells ‘B4’, ‘C4’, ‘D4’, & ‘E 4’ were changed by adding the
abbreviation text 'Q T R ’ in front of each quarter number
Before formatting:
A
В
1
2
3 TOTAL SALES Column Labelt *
A REGION
■
3
5 Central
11,359 $
$
6 East
3,865 S
$
7 West
2,64$ 5
$
£ Grand Total
17.870
$
*
A fter formatting:
E
F
С
D
2
19,352 $
19.343 $
23,536 S
62.281 *
4 Guild lo u l
3
34,097 S 73,763 $ 138,571
38,811 S 83,569 $ 145,588
42,590 S 127,964 5 196,787
11S,499 S 28S.2W $ 480,946
TOTAl SALES
ВY QUДRTFR
REGION
QTR I
QTR1
QTR 3
QTR4
Grand Total
East
$
$
West
5
2,646
S
23,586
$
42,590
$
127,364 $
196,787
$
17,8ГО $
62,281
$
115,449
$
285,246 $
480,946
Central
Grjiitl rutal
11,359
S
15,352
%
34,097
$
73,763 $
138,571
3,865
S
19,343
S
38,811
$
83,569 $
145,588
How To Drill-Down Pivot Table Data
Before we continue with our Pivot Table report examples, let’s say you wanted to investigate
further why the Central region’s Q1 results are so much higher than the other two regions.
Pivot Tables allow you to double-click on any calculated value to see the detail of that
cell. You may also right-click on the calculated value and select ‘Show Details’. This will
create a new worksheet containing a table with the details of the calculated value.
Please see images below.
1.
Right-click on cell ‘B5’ and select ‘Show Details’
B5
11358.9
В
D
1
2 I
3
Сі і і Ь п
TOTAL SALES
4 RfGION
Ъ I C entra I
6 Е<Ы
7
W est
8 Grand тоЫ
9
10
BY QUARTER
В
- q titi
I
il.l™ 1 i n ТІСЛ' Г
i,a p y
Ш
г.б* £ format CelfiI?ла Numb**F'prnnJ.
iefreh
тл w l i
11
12
K tm c n t 4TOTAL SALES"
13
Sugnmanz# V *lu « By
14
Show V |lu « A i
15
t
16
0
17
IS
V^lut Field Setting;..
PivotTзЫе Option?-
19
p I Hufe
2D
List
A new worksheet containing a table with the details of the calculated value in cell ‘B 5’
K ttlO ft p M i£& №ИН*Ч I m i iuumi Q I N I S щ русщ LM* * u u « В
-П
W.la* H » Q « n u ^ Q i riufcG i* □ млМг,и> □ ИЛля
Bob
M *l*n
1Ш
I
31 to
JHJ4
im
S fM h
EU
L
IQ3.1
13* J
И A
Сепия!
1*11
■СгЬщдат
tl
Ш
34
«1
Ѣ«ІІГ
Іл й і
»
vn
1
fe r fr r tl
L
T№
*J4
144
№
1
№
ив д
ѢІЛ
ПѴ*| I
i.i.-i 1
1
1
j
‘1
t c n lr il
C a n lril
£ «гЛ гіІ
IttM f
S h w ti
2.
To delete the table, right-click on ‘Sheet3’ and select ‘D elete’
3fl2D j
Э І5 n
j
Insert
Protect Sheet...
l i b Color
>
hi"**
i l l Sheets
s n « li
ьлееьг
I
ъпеег i
I
Adding Additional Rows (categories) To Your Pivot Table
From our original Pivot Table report, w e’ll extend our analysis by adding the individual fruit
sales to our summary.
1.
Drag the ‘QUARTER’ field from the ‘COLUMNS’ section to the ‘ROW S’ section.
2.
Drag the fields ‘APPLES’, 'ORANGES’, & ‘MANGOS’ to the ‘VALUES’ section
of the PivotTable Fields pane, place the fruit fields before the ‘TOTAL SALES’
value
PivotTable Fields
X
T
i Choeifi fidefts to add to report
-
Seai’ch
P
□ SALES PERSON ID
Д QJJARTE_R ^
* •
ЛРИІЛ
a
S|
ORANGES
v ] MANGOS
!3 т о т а Г
j—
J
\
4
i
*
Mens Ttble,-.
1
Drag fidds b ( t » w a r a i bde.v
\%
\
4
1
1 Cci3unn1)i
— %—
E Values
i
i
i
i
i
i
T Filler!
”
4
i
Rom
|
f
t
values
flfGIQN
-
QUARTER
, i Vj* '
V
,*
lim iin f/y m ts
t
ifW o f O tW IG E S
^ |
Sum of m a n g o s
*
TOTAl SALES
-
The results should look similar to the following:
| REGION
Sum of APPLES Sum q f ORANGES Sum of MANGOS TOTAL SALES |
! - Central
$
43,4®1
S
53,278
$
41,812
$
138,571 |
j
QTR1
$
4,631
S
3,264
$
11.359 !
QTR2
$
$
3,463
j
5,992
$
7,652
5,709
QTR 3
$
10,634
$
13,280
10,183
$
$
19,352 !
|
s
$
QTR 4
$
23r392
$
27,715
$
22,656
$
73,763 !
$
47H84S
$
14S,S88 !
s
s
s
5
1,190
$
3,865 i
6,303
$
19,343 !
12,726
$
$
$
$
$
5
$
$
38,311
!
|
%
SO,626
*
47,117
оти i
s
1,587
s
1,087
QTft 2
$
6,891
6,149
QTR3
$
13,583
s
i West
$
QTR 1
£
:
QTR 2
$
QTR 3
S
QTR 4
$
|Grand Total $
29,564
s
s
5
:
|
East
QTR 4
11,502
27,380
27,625
$
S
65,259
1,119
$
$
61.778
856
7,819
5
8,253
s
7,513
15,335
S
$
S
14,074
41,813
$
$
$
40,411
69,750
45,739
16J,8S7
16S,6SS
671
13,182
m ,4 1 S
34,097 |
'
53,569 i
'
;
23,586 |
196.787
2,646
42,590 |
;
480,946 |
127,964
Charts - How To Create A Basic Pivot Table Chart
In our last example of this chapter, w e’ll review how to create and format a basic Pivot Table
chart:
1.
From the PivotTable Fields pane uncheck the 'TOTAL SALES’ field
PivotTable Fields
*
Choose fields to add to report:
x
О
*
b d APPLES
2.
0
O R A N G tS
0
MANGOS
□
TO TA L
From the PivotTable Tools Ribbon select the tab Analyze : PivotChart
PivotTable Tools
Sign in
Design
0
T ell m e w h a t y o u w a n t t o d o
E? C le a rT
DJSelect^
D M o v e P ivo tT a ble
[]3. Fields*Item s, & S e t s T
A ctions
Calculations
f t OLAP T o o ls ■
life
Щ
P iv o tC h a rt R e co m m e n d e d
R elationships
P ivotT ables
Tools
Note: I f you do not see the PivotTable Tools option on your Ribbon, click any
PivotTable cell. This toolbar option only appears when a PivotTable field is
active.
The following dialogue box should appear:___________________________
3.
Select the ‘B ar’ option
4.
Click the ‘OK’ button
A chart similar to the below should now be displayed:
Sum of APPLES S e i o f ORANGES Sun of MANGOS
OTR4
s
s
ОТЧЗ
QT4 2
Ш
QTR1 1
QTH*
REGION
-
Bt
re
lAJ
QJJAR TER -
QT4 3
Vetoes
Ш Ш І
4 Sum of MANQOS
QTR2 H
■ Sum of ORANGES
QTR 1 1
J от aAnni
■- fbum
rrixс>С
QTR4
4
С
(I
О
QTR 3
■ H b -
OTR2
H
QTR 1
■»
+
5.
S-
-
SI 0,00<S20.006 30. 00040. 00(150,000
Drag the chart below the Pivot Table report summary and expand the width to allow for
easier viewing
A
&
10 QTRІ s
lr5S7 i
MU S
11 QTRJ $
12 OTRІ S lir53i S
13 QTH4 $ 23,564 S
14 WHt $ 69,750 S
15 ant l S
356 S
16 QTHi S
7,619 S
17 QTR3 3 li,33S S
is QTR4 s 45,739 s
14tirjndТоЫ * 1БМ57 *
с
1,037 s
$
iz,soz $
27,330 $
65,254 s
1,119 s
Br2» s
цоя $
ilrU! s
164,«4 i
20
21
S ur. d f APPLES
jf a fW K E S
22
6.
а
отв J
i
GTS 2
If
14
25
26
23
29
30
31
«I
33
£
F
G
1,190
wa
12.726
27,623
p'vat
6X773 т2 * ’ч
T41*^
£71
§
Mu
w
11.102 1fI
40.411 1
151435 41
Expand chart wMti
ЦТН4
23
27
S j t , o f HANGCS
D
S E G ]» .
-
ОТЧ1 k
отц4 ш
, цшj
■ S-jfti Ы M A IS G O i
(JJAftTER T
Щ
5Ш
ІIfORAffCJS
QTH 1
■ S - j n r f ЛРР1 ЕЕ,
QTR 4
Z a™*
jj
от* i
Q T f ll
SW.ooo
ІМ.0Н)
jJQ.UOO
S40.00C
і5 0 .яю
From the PivotChart Tools Ribbon select the tab Design and under ‘C hart Styles’ select
a new style
:
E
D
i
D r ju
t - =
P ag e I ■>43ul
ЕгшЙчЦт й д - b e d
Роѵгпыіи
D
А л а іу зі
1
D n ig n
F w rndt
'Cnlumpj
□d
7.
Edit the Chart Title by clicking inside the field, change text to "Fruit Sales By Region &
Q uarter 2016”
8.
Optional step: hide the Field buttons, right-click over any Field button and select the
appropriate hide option
F ru it Sales By Region & Q u a rte r 2016
от**
Я qTHэ _--- ;---$ (JTH.J
от# i
ofm
СГГЯ3
№ QTfl 1
Отт E
:n^
и чти 3
5 QTB3
ann
CHAPTER 4
Displaying Percentages
Another great benefit of using Pivot Tables is the ability to display numbers in various
descriptive formats. In this chapter w e’ll describe how to use percentages to determine:
• The percentage of Individual Fruit Sales by Quarter
• The percentage of Total Sales for each Region
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
FruitSales.xlsx
Create a new Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
chapter 3 ‘Summarizing Numbers’:
1.
Open the FruitSales.xlsx spreadsheet and highlight cells A1:I65
2.
From the Ribbon select INSERT : PivotTable
3. When prompted, verify the ‘New W orksheet’ radio button is selected
4.
Click the ‘OK’ button
A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side of your
screen.
5. Click the following fields:
1. Quarter (Rows section)
2. Apples, Oranges, Mangos (Values section)
A report similar to the following should be displayed:
6.
Click on the ‘Sum of APPLES’ drop-down box and select ‘Value Field S ettings...’
The following dialogue box should appear:
7. In the field ‘Custom Nam e:’ change to % of APPLES
8. Select the tab ‘Show Values As’
.-Ch l$ e
V a lu e F ie ld S e ttin g s
S ource N a m ;-
APPLES
Custom Name:
i
X
* * * * £ *
Sum of APPlES
^
■■
Summarize Valuer By j Snov. Values At
i
JjuiTimante value fieldby
Choose the type of taU u ia tJo fttha t jrOu w ent to u ie to sum m arllt
data From the «elected field
H
[S um
-----------------------------------
Count
A v e ra g e
M a*
M in
V
P ro d u c t
Number Format
Cancel
OK
— !l
9.
From the ‘S h ow v a lu e s a s ’ drop-down list select ‘% o f Grand T otal’
10.
Click the ‘O K ’ button
V a lu e F ie ld S e t tin g s
Source N am t
APPLES
£ u ito m Name:
W A P P IE S
Su m mа гке
a(u e s B>
SJi ow Value s A*
Show Vfluei лv
%OfGrandTotal
a it fit
rlcm.
R E G IO N
SALES PERSON P№ 1
SALES PERSON LAS T NA
SALES PERSON IP
H u m b e r F o rrn a t
OK
Cancel
11. Repeat steps #6 - #10 for ‘Sum of ORANGES’ and ‘Sum of MANGOS’
The totals by fruit have been changed to a percentage.
Please note: In Excel®, often the percentages when summed together may exceed or not equal
100%, this is due to Excel® rounding the percentages either up or down.
We’ve now answered the question, what are the percentage of Individual Fruit Sales by Quarter.
To determine the percentage of Total Sales for each Region
12. Remove (uncheck) all the fields ‘APPLES,’ ‘ORANGES,’ ‘MANGOS,’ and
‘QUARTER’
13. Click the following fields:
1. REGION (Rows section)
2. TOTAL (Values section)
14. Right-click over ‘Sum of TOTAL’, (cell 'B 3’) from the pop-up menu select ‘Show
Values As’ and then ‘% of G rand Total’
We’ve now determined the percentage of Total Sales for each Region.
A
В
1
2
3
REGION
» Sum o f TOTAL
4
Central
23*81%
5
East
30.27%
6
W est
40,92%
7
Grand Total
100.00%
L
You may want to change the column heading from ‘Sum of TOTAL’ to something more
descriptive.
______________________________________________________
B3
A
£
В
% OF SALES 8Y REGION
_ |
1
2
-
% OF SALES BY REGION
3
REGION
4
Central
28.81%
5
East
30.27%
6
West
40.92%
7
Grand Total
100.00%
С
CHAPTER 5
Ranking Results & Displaying Averages
In the previous examples we focused on summary level types of analysis, Pivot Tables also give
us the capability to analyze individual results for comparisons and ranking information. This can
quickly be accomplished without the need to manually sort or add additional calculated columns
to our original data source. In this chapter w e’ll demonstrate how to:
• Rank each Sales Person by their individual Total & Average Sales
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
FruitSales.xlsx
Create a new Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
chapter 3 ‘Summarizing Numbers’:
1.
Open the FruitSales.xlsx spreadsheet and highlight cells A1:I65
2.
From the Ribbon select INSERT : PivotTable
3.
Verify the ‘New W orksheet’ radio button is selected
4.
Click the ‘OK’ button
A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side of your
screen.
5. Click the following fields:
1. SALES PERSON ID (Rows section)
2. Drag TOTAL three times (Values section)
A report similar to the following should be displayed. Note: all three o f the ‘Sum o f TOTAL’
columns are currently the same. We will be changing them in the following steps.
1
1
A
a
□
С
«ю іТ эЬ Іѳ Fields
11
12
I
How Label* - Sum o l TOTAL Sum o t TOTAL? s u m Of TOTAL)
14
100
10339
10139
10139
| s
1 ..
300
3 0 J 1 7 .« 7 5
» H 7 .4 i J 5
В Д 17ЧЛ
391
Ш И
114»
I7
300
11*91
llfitr
1
1M 44.7
400
1SI36.J
1SJ 76.1
Ш П .2
500
1*
11" BOO
wo
Ю111.11Л
30137.7 139
30137 7139
17013 №
ЗКЦЗ *74
1J
И Л ІЛ
1 7 4 S .0 J «
170J3.434
iJ M fc * »
iT T S i.o w
im i.4 1 0 »
ІШ 1 4 » »
113 53}
' i s э ао
4М 71.4І013
45*71 4VJ1S
*5*714*013
S S i2 0 .1 9 « 5
S ii2 0 194K
55120.19*85
\u 1000
50 9 Ц .З И Ш
54925.33004
54H25.1HG4
too
!
1 ! ! 000
I M I .U
к ю а м № Ed a d d to г н и
lOIAl
? 4 n t.«
J14 «17
a w * »
І Ц 115*
636M -U61fi
[и
1174
w m iia
™
i.
G rand Total
«OMfc.OW*
■ now **
Bk
M fS KRS/QN ID
&ЭСШ.Ш1Е
.г us
Ъѵт Ы TQTAl.
e a s
Sum o f TQTALI?
к и м и я
Sum o f T0TAL3
w
6.
Change the label for cell 'A 3’ to 'SALES PERSON ID’
7.
Change the label for cell 'B 3’ to ‘TOTAL SALES’
8.
Change the label for cell 'C 3 ’ to ‘AVERAGE SALES’
9.
Change the label for cell 'D 3’ to ‘RANK’
10. Change the formatting for columns ‘B’ & ‘C ’ to a currency of your choice with zero
decimal places. In this example I will use the British Pound.
Асс4ііяЫч “ ( j| Согккыіпа! Ft
t V' fCл - - > лeo
V
,
Farrt
Cupboard
1
r-
U f n H f ll
*
$
f
s
«
с
t
С
Глbr\ r u lM (i
* %
v
/
"f ‘
it*»™ a i m
«C hnw M
<Hf *Hftthі5ччЛtv lrid
-
*
1
ALLS PLHSUI ' 10141 SAliS AVtULrf SAILS
loo
10.3» £
lo .i A ,
/
І
ioo
10.317 t
I
Л .117
3»
t
11,4»
t
14JJ7
300
1 4 .» 1 I
£
400
1УІ7» 1
ІУІ74
I
*00
w ,3 ij £
t
3o.tti
1)00
i
І4 .ІЯ t
1A.ta
M0
17,011 1
1ТЛ11
I
1І.70Я 1
too
£
гi.m
BOO
£
17,735 с
1Т.ЦЛ
D IU £
417
i
ІЭ.ЭіЗ
«671 £
Ш
I
45.471
W.1J0 £
900
£
К.1Я
1000
50.925
f
S0.W5 E
63. £06
H it.
£
Sl.WS t
HANK
101»
Ю7І74775
114»
IMM 7
u s u
J O J J iJ li*
Ш М .І І
17013.4»
JJ7044H
17755.01*5
5№ l.6 H 2 5
45671-45013
5 Н И 1«S5
50925.3IDM
113*
fjjinrtTnUl
JJSK І5І5
4S N 46.0W
£
'ч
І4.595
F e # m it 9 i T i t ;
&E«дйтіНiUrtrfed Mjrtts!1
,(V
JT
J*
• |
A
E
£
£
шит
----- -------—
-----------
4 » ,» * -
ыъоьиыь
Displaying Averages
11.
In the PivotTable Fields ’p a n e , in the ‘V A L U E S’ section, click the drop-down box for ‘AV ER A G E S A L E S ’
12. From the menu select the ‘Value F ie ld S e t t in g s ...’ option
P iv o tT a b fe Fields
C hoose fields to add to re p o rt
:Search
□ ORANGE
□
MANGOS
H
TOTAL
Mm
More TibJet...
Up
Move Down
Move to Bf|>n^inq
Drag fjeltb b«h*wn a<
M o v*io fcnd
T Fiifen
T
McwtLo Riper! Filter
M w t № fto w lib e lt
-
R.DWj
m
M ovelo Column Labels
*
«*nw«ReW
SAL ES PEKSON Ю
Value Fidd Seflin^i.,.
AVERAGE SALES
-
RANK
*
The following dialogue box should appear.
13. From the 'Summarize value field by’ list select ‘Average’. Note: this will change
the ‘Custom Name: ’ to ‘Average o f TOTAL’, change back to ‘AVERAGE
SALES’
14. Click the ‘OK’ button
X
Value Fiefd Settings
Soutte Ham*: TOTAL
£u rto m Name
Average of TOTAL
SummJnK Va!u«l E>
Shpw Valu<l At
^и гчилгие ѵліиг firtd by
C tiooie the typ * o f ta b u la tio n that you w a rt to u ie to i u m m a nit
data from the ftie tle d f if id
i Sum
1Count
A w ra o r
M ai
Mm
! Product
Number Format
A
V
OK
Cancel
Ranking Data
15.
In the PivotTable Fields ’p a n e , in the ‘V A L U E S’ section, click the drop-down box for ‘R A N K ’
16. From the menu select the ‘Value F ie ld S e t t in g s ...’ option
The following dialogue box should appear
17. Select the tab ‘Show Values As’
18. From the ‘Show values as’ drop-down list select ‘Rank L argest to Smallest’
19. For the ‘Base field:’ box select ‘SALES PERSON ID’
20. Click the ‘OK’ button
X
Value Field Settings
So u k # Nam e
TOTAL
Custom Name:
RANK
S u m n w lie Values By
Show v a lu e i A*
Show values и
S a ie rtem
Base fie ld :
REGION
SALES PERSON FIRST N A M E
SALES PERSON LAST N A M E
h - LE' i PE F?j ■
D
QUARTER
АРИ.Е5
л
H
I
v
Number Formal
The results should look similar to the following:
OK
Cancel
A
л
В
С
D
1
2
3 SALESPERSON
4
TOTAL SALES AVERAGE SALES RANK
100
£2, MS
16
5 200
£30.217
£7,554
7
6
255
£11.4 M
£3.675
15
7 300
£>6.857
£4,314
13
6 400
£15.3716
с з .в іэ
14
Э 500
£30.333
£5,033
11
10 600
m .t w
£6,335
6
11 6Э0
£37,013
£5,353
5
700
Ш .7 З Д
£5,577
10
13 BOO
£17,755
£4,439
13
14 317
£33,433
££,4*1
6
13 333
£45,671
£11,4 IB
4
16 Э00
£55.320
f 13,830
2
17 1000
£50,925
£12,731
3
18 1156
£63,606
£15,502
1
19 1174
£24,595
£6,149
9
20 Grand Total
£480,946
£7, Sib
u
Let’s improve the readability:
21. With your cursor in cell ‘A3’ from the PivotTable Tools Ribbon select the tab
Design
22. Check the box ‘Banded Rows’
23. Place your cursor in cell ‘A3’ and click the drop-down arrow
24. Select the option called ‘More Sort O ptions...’
SALES PERSON Іс""ПTOTAL SALES AVERAGE SALES RANK
|j I
Sc rt Sm a 11est to La rg e :t
£2,585
гЦ
S o rt Largest t o S m a lle st
£7,554
7
£2,875
15
£4,214
13
£3,819
14
£5,083
11
M o re Sort O p tio ns...
К
Clear F ilter F rom "SALES PERSON ID"
Label Filters
►
V a lu e Filters
►
Г
16
£6,225
8
£3,253
5
£5,677
10
£4,439
12
£8,483
6
- 0 255
£11,418
4
- 0 300
£13,830
2
£12,731
3
■ 0 600
£15,902
1
- 0 690
£6,149
9
Search
P
Л
- 0 (Select All)
■0100
-53 ZOO
■ 0 400
- 0 500
■■■■0 700
m n.«.»
V
OK
£7,515
Cancel
The following dialogue box will appear.
25. Select the ‘Descending (Z to A) by:’ radio button
26. Select ‘RANK’ from the drop-down box
27. Click the ‘OK’ button
We now have a nicely formatted report that shows us each Sales Person’s sales rank and their
Total and Average Sales.
j
!4
!5
i
i' &
|7
SALES PERSON Я TOTAL SAL£S AVERAGE SALES RANK !
1156
£63,606
£15,902
11
:
900
едао
£13,830
1000
£50,925
£12,731
г !
3!
833
£45,671
£11,418
4
!1з 690
! 9 817
! lo 200
£37,013
£9,253
5!
£33,932
£8,433
6
£30,217
£7,554
7!
l i 600
£24,899
£6,225
e!
! 12 1174
£24,595
£6,149
9
13 700
£22,708
£5,677
го !
! 14 500
£20,332
£5,033
li
! 15 800
16 300
£17,755
£4,439
12 !
£16,857
£4,214
13!
І17 400
£15,276
£3,819
14 ;
18 255
£11,494
£2,875
15 !
І19 100
£10,339
£2,585
16
'12.0 Grand Total
£480,546
£7,SIS
I
i
j
CHAPTER 6
Slicers (interactive analysis) & Advanced Filtering
An additional tool within the Pivot Tables feature set are ‘Slicers’. Slicers are graphical filters ,
ideal for analysts or customers who like to examine data from many different perspectives. While
filtering has always been a component of Pivot Tables, the introduction of the ‘Timeline Slicer ’
has been a welcome enhancement as it allows the user to quickly categorize individual date
values into months, quarters, or years. There are two types of slicers 1 ) Timeline Slicers
available in Excel® versions 2013 & 2016 and 2) Slicers available in Excel® versions 2010,
2013, & 2016 .
For example, let’s say you’re a Financial Analyst that supports a manufacturing company
of aerospace parts.
You’ve been asked to attend an impromptu sales meeting for regional
managers. The agenda has not been determined, instead you’ve been asked to prepare the sales
data for the last 12 months and answer questions as they arise. Since you’re unsure of what the
managers will ask, you decide to create a Pivot Table report with the slicers Category & Date.
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
AirlineParts.xlsx
EXCEL® 2013 USERS - PLEASE NOTE
Excel® 2013 users will need to follow slightly
different steps for the Timeline Slicer exercise, these
instructions are outlined in that specific section.
Sample data for this chapter, due to space limitations the entire data set is not displayed. Note:
Column ‘E ’ is a date value.
Timeline Slicer
Create a basic Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
chapter 3 ‘Summarizing Numbers’:
1.
Open the AirlineParts.xlsx spreadsheet and highlight cells A1:F3889
2.
From the Ribbon select INSERT : PivotTable
3.
Verify the ‘New W orksheet’ radio button is selected
4.
Click the ‘OK’ button
A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side of your
screen.
5.
Click the following fields:
1. Region (Rows section)
2. Category (Rows section)
3. QTY (Values section)
In order for a Timeline Slicer to work all the data for that field must be form atted as a d ate. In
this example, once we click the date field. ‘EOM_DATE’ in Excel® 2016 will create addition
calendar options Q uarters & Years.
1
4
J
I
7
I
4
Очен tedt b rid ю rapt:
Sl*n си QIV
9ГМ
ЛЧ
з т
7Jl
(r iilu t
FUEL
POWER
STFUCTUJWL
WMG
I dll
p
Ngtt f h <
;!/J U G H *
ИШНКЖт incSud€ i*'! tfoe rtport
ijj—
£L—
——
**
Cj ^ lViVk ' '
v st
33; off
7Ц
U h i 1i | l n _
lilt
H 2
a n
д а
г»
МП
m >u
t*kH bw»ii<i доми M ow
3»
21
22
У- Ѵ ліиа
и
24
H
»
6.
fold
□ hawbtfc*t wr clitk it, to
m*
Й »
J«S
U
FUEL
ii
POWFB
1J
ITHUCTUMl.
IS
WiHG
14 « Ч І
is
fuel
14
OOWf*
17
ЯИиСТиЯА;
ul
WINS
]? Gund TcUl
—1
к
о•
PivotTable Fields
1
S u m rfQ lY
САТЕ50»
_________________
Shm
D tftI L±,__4 - г-У. с
Click the field ‘EOM_DATE’ as you can see, Excel® 2016 has created fields for
Q uarters & Years*
*Excel 2013 users please click here to see step #6
JbUHnrtQTV
CC4ltTAl
97И
FUEL
ШВ
"2DIfi
mb
■Ш
259*
- POWER
m i
z»
■2Dlb
* 2017
STRUCTURAL
- 2DIb
*»17
- W ING
* 2Dlt>
ra
Jb№
- 2017
- KTHLHTTURAi
*2016
±2017
P'S** twiii
ІШ
m
- FLtfli
*201Я
0tpg n r * ? № №
'57
№
tsu
- POWfcH
2 ip
2Ы1
* 2017
East
^2016
*гои
И HttJMffl
2307
2№
2йьг
2Ю
Г
ЗЬЭС*І
25E
C iT Iv D tT
2ЁЗЭ
’
Hum of q l v
-
fmm
m
«1
СйнЦ М Ц
660
However, this type of display isn’t very helpful. The Financial Analyst won’t be able to quickly
answer very many questions. Before adding our additional slicer, let’s re-arrange the Pivot Table
report to be more user friendly.
7.
Uncheck fields Years & Q uarters
8.
Drag the field ‘EOM_DATE’ to the ‘Columns’ area. Note: how ‘EOM_DATE’ is
now displaying as a month
1-----
4
PivotTable Fields
1
1V tjm o iQ T V
!
i 1 flo w j j l i f k
i ri
f РГКІГЙІ
1■
•7
1■
hi
j an
kfliunm label* -
FUEL
POW ER
M ir
I
+* «at I
M >9
O rt
No,
f
m
STlHUrtLIRAL
W IN G
fill
f f l lO m .D A T I
@Qtt
□ Омі**і
□ *«n
V I
№
I j.
S H U C fU B A L
POWER
191
ш іі
!-■■■
FUEL
|1G
POW ER
STTRUCTl IRAL
1
s
-
W IN G
W Hl
>*gili** йНрнп * іи ммп
4»
FUEL
1 ■
Feb
W
1 w » PJ w* IK CT * 7 2 w wfi шгі
34 151 247 J« 1» Л* 744 154 127 M 4
2Ч> 171 * 4 ?» in тщ гю 230 H 4 1 »
57
•1 >• >7 *7 Я
57 S4
1)7 LH 1 |$ | ] f
ін л і Ш IM m
VH fejf M
lШ
Й44 V » №17 H I
Й4 IU 217 2J4 Ш 217 314
г*4 144 2*7 734
г» 1 4 117
271 i? 4 » i
*u tn ЗЗД 3 »
41
■1 V 3d ftl 5* 9* 41
»
72
4E
113 » i in
30 * 34
391 Л Н » l 191
*1? ■л* ni
л» 122
«22 144 « 4 423
324
334 152 279 134
w Ш 719 jя ш
НЯ ІЫ 2JS 2 4 JfiO 233 3 7 |
374 140 291
« tv 73 « 71 71
72 42 94 72
? 734 3ft] з*в эм 3
&
1 344 241
П* Щ »
Щ 1
,u
! 14
bn
C4M t1№
W J M .O A tt
%m
-
.
319
374
ЕЧ
119
W IN G
>20 G ra n d T o ta l
12
1№ 1П1 24bfl *ьт m i
■MT V
I f S l 3117 JS-Ю
*
flo » 3
U f& Q W
1
*
Values
Sm t i u f QTV
*
C ATKQ R Y
III
9.
Insert 8 blank rows above row 3
10. With your cursor located inside the Pivot Table, from the PivotTable Tools Ribbon
select the tab Analyze : Insert Timeline
AirplaneParts.KlsK - Encel
Data
Review
View
Developer
■m
—
!T ]
Insert Insert
Slicer T im d m e
flit? r
[ііп
№
F iln
D esign
Power Pivot
Refresh C hange D ata
*
S ource *
D ata
[jjt C lear *
Г7- Select *
L -f M o ve P ivotT able
in n r
"A Ur f 1U
F1j
You’ll receive the following prompt:
11. Click the ‘EOM_DATE’ checkbox
12. Click the ‘OK’ button
13. The following Timeline slicer should now appear, drag to the area near cell ‘A1’
You may click individual months to view how the counts change. For example, you may click Jan
2017 or Jan and Feb 2017 to see totals change.
E
11
i7
EOM _DATE
\
MONTHS *
Jar - Feb 2017
I4
2016
NOV
2017
JAN
№R
APR
FEB
15
І6
«
!7
13
5
|io
Month -T
ill q r y m
• Jan
F#h Grjnd Toul
!12 Hcvj Ldbtli
13 Central
(Ml SM
1462
FUEL
24S LSfi
14
406
270 171
441
POWER
tfi
Jl6
STRUCTURAL
31 54
Ш
117
WING
294 1B6
480
320 S96
151*
;i8 - Fast
FUEL
254 164
41S
[19
|20
POWER
273 174
447
DEC
F
№
>
14. Change the Timeline Display from Months to Q uarters
C lic k t o n e w 0 v«L__^
a ff
EO M _DATE
r
l
Q3 2017
2016
Q1
F itte r s'-
i_ I .
QUARTERS
i
04
1
/
1
f
1
M7
02
03
t'
Vj 1
04
С13
Q2
t
І
f
I
t
q iy
M O rttti
m
Row L a b e l*
Central
FUEL
{
T
Aug s e p
т tu t
( jr a n c l 1 o t. il
ЛГ2
864
S72
2613
Z48
267
248
763
POWER
230
278
230
738
STRUCTURAL
57
61
57
ITS
WING
337
263
З І7
937
846
«21
846
2513
FUEL
236
237
236
709
POWER
258
251
- *
258
767
•*-*<■-
East
.« 1 Ifltl
Excel 2013 users (step #6)
Users of Excel 2013 must complete a few additional steps:
Step 6a: Select cell ‘A6’, right-click, and from the pop-up menu select ‘G ro u p ...’
1----Id
R o w Labels
1
Central
15
'6
В
FUEL
I
=r о - д
П р г с т Ь т 1П1Й I
"
~
-K
-
^
1 ІЯ
I
i
i
i/
3 1 Januar %
C opy
!f
28 Februa H
EorrnatC ?
. ■
31 Match
i
i
30 April Ъ
Refresh
no
1
|
i
i
І14
31 M ay 21
30 June 2'
31 July 20
31 August
15
3D Septen
16
1
31 O ctot* Ш
V
30 Noven J2g Ungroup„
;
и
|L3
la .
Firmer
>
I
*
i
*
И
i
h
i
Subtotal "EOW DATE"
i
\
1
Step 6b: When the following prompt appears, press your 'CTRL’ button on your
keyboard and select ‘Months’, ‘Q uarters’, & ‘Years’
Step 6c: Click the ‘OK’ button
Step 6d: Return to Step #7 above
Slicer
Next, w e’ll review the Slicer functionality.
1.
With your cursor located inside the Pivot Table, from the PivotTable Tools Ribbon
select the tab Analyze : Insert Slicer
AirplaneParts-xIsx - Excel
Review
View
PivotTab!
Developer
1
Lo
i
ffij
1
Analyze
Design
G? Clear *
Insert
Insert
Fitter
SIIl с I I' Timeline Connections
Refresh Change Data
'
Source'
E l Move PivotTabte
Filter
D ata
Actions
You’ll receive the following prompt:
2.
Power Pivot
Click the ‘CATEGORY’ checkbox
3.
Click the ‘OK’ button
4.
The following slicer should now appear, drag to the area near cell ‘H 1’
The Financial Analyst may now answer all types of questions, with just a few clicks and without
having to manually re-sort or add/remove formulas. Here are some examples:
•
What are the total Fuel sales for Feb 2017?
•
What are the combined sales for the Structural & Wing categories only?
•
Provide the Q4 sales for Power
ADDITIONAL INFORMATION:
While having the date fields Month, Quarter, & Year automatically be added to our Pivot Table
fields list is helpful, there still may be times when you want to have the individual dates included
in your report. To see the individual date values in our current example:
1.
From the ‘PivotTable Fields’pane uncheck fields ‘REG IO N ’ & ‘CATEGORY’
2.
Drag ‘EOM_DATE’ from Columns to Rows
3.
From the Pivot Table right-click over any of the month values
4.
From the pop-up menu, select ‘Ungroup... ’
Home fnsert I Draw Page L i \ Format | Data Wш п с т
V im
Develop! Power F Analyze | Design I Q Ted me
f i ; C o n d ^m l ftnr^ap'ng -
Fflfmifii Tibk^
^>CeilS(yt*s'
F o r m i t Cefts ,■
P«TC
£
fic fre ^
C lip b o a rd
jrfjrt
i*
Д1В
f ille r
* i
HP
C eH i
p
Щ
Editing
JtH
S u b to ta l "EO M _D A Tf ‘
D
9
is p if ld /C o lto p w
10
11
и J*n
13 F
eb
С
*
P iv o tT a b le Fields
Ф|І sin ™ ? ...
33 U ^ r t l u f i .
LbfrfrM i f r t t d l t e a d d tie r e p o r t :
M r»,*
»
14 Mflr
X
R e m o te JE O M J > A T P
L J PART
15 Apr
%
F ield l i f l t i n g i .
Ц5 ІІШ DAT I
16 Miy
17
Jim
l,.; |J u l
P w t T i b l e O p tio n * .
В
H id e Fitlgf L iu
L J V e in
19 Aug C ilib n v
|n
20 sep
21 OCl H I ^
■ д‘ V
22 N a v
3117
23 Dm
24
63QTV
■.
G r i n d T o ti I
■a
D ra g fbekh b e tw e e n i r t i s b-clcT
2И0
ть7і
fif e tn
HI C o lu m n s
— Асмп
25
5
EOM^DATE
26
-
VaJue-5
S u m o f QTV
*
The individual dates should now be displayed:
ii
Row Labels
'
Sum of QTY !
12 31 D ecem ber 2016
2540 !
13 31 January 2017
2725 i
14 28 February 2017
15 31 March 2017
1753 '
i
2469 ;
16 30 A p ril 2017
2540 |
17 31 M ay 2017
1753 |
10 30 June 2017
246S !
13 31 July 2017
2540 !
20 31 A u gu st 2017
2473 i
21 30 S e ptem be r 2017
2540 '
i
1753 ;
22 31 O ctober 2017
23 30 N o v e m b e r 2017
3117 I
24 Grand Total
28672 |
To change the display name of a Slicer:
1.
Select the Slicer
2.
From the Timeline or Slicer Tools Ribbon under ‘Options’ go to ‘Caption’ or ‘Timeline
Caption’ and enter a new name
To change the color form at of a Slicer:
1.
Select the Slicer
2.
From the Timeline or Slicer Tools Ribbon under ‘Options’ go to ‘Timeline Styles’ or
‘Slicer Styles’ and select a new color scheme
Advanced Filtering
In the first part of this chapter we reviewed how Slicers may be used for quick filtering. In this
section w e’ll demonstrate how to employ additional Pivot Table features which allow us to
extend our analysis by specifying conditions. For example, in the airplane parts spreadsheet, if
we wanted to know:
1.
The top 10 airplane parts sold by category?
2.
The bottom 10 airplane parts sold by category?
3.
The top 10 airplane parts sold by Quarter?
4.
How many parts sold more than 800 in quantity?
If you’re familiar with Excel’s conditional formatting capabilities, this is very similar in Pivot
Tables.
Let’s walk through another example to show how this functionality may be utilized.
To see screenshot illustrations of steps #1 - #4, please see chapter 3 ‘Summarizing Numbers’
1.
Open the AirlineParts.xlsx spreadsheet and highlight cells A1:F3889
2.
From the Ribbon select INSERT : PivotTable
3.
Verify the 'New W orksheet’ radio button is selected
4.
Click the 'O K ’ button
^■ IZ ^A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side
of your screen.
5. Click the following fields:
1. Part (Rows section)
2. Category (Columns section)
3. QTY (Values section)
6.
Click the drop-down arrow of ‘Row Labels’ cell ('A 4’)
7.
From the menu select ‘Value Filters’ then ‘Top 10’
8.
The following prompt will appear, click the ‘OK’ button
The following will be the result, you may change the quantity from 10 to any number you would
like to see.
Color '
Sum of QTY
I
RowLabels
X FUEL
POWER STRUCTURAL WING Grand TotaJ
ЗЛ9
I Auxiliary Structure
949
j Boost Pumps
841
541
Digital Fuel Fiow System
84 1
841
Engine Lubrication System
849
S49
901
Engine Struts
901
Fire Detection
837
337
Fire Protection
1065
1065
831
Fuel Dump Fuel Hose
331
857
Keel fleam
W in g w e b s ________________
Grand Total
1302
3412
SS7
357
S49
349
2699
as70
Similarly we may change to show the bottom 10.
9.
Click the drop-down arrow of ‘Row Labels’
10. From the menu select ‘Value Filters’ then ‘Top 10’
11. The following prompt will appear, click the drop-down box that says ‘Top’, change
to ‘Bottom’
12. Click the ‘OK’ button
The following will be the result, you may change the quantity from 10 to any number you would
like to see.
Sum of QTY
Row Labels
Colirr T
Д FUEL
POWER STRUCTURAL W IN G GrandTotal
, AC Generator-Alternator
653
653 |
|AC Inverter Phase A dapter
741
741 |
lEngine Mounts
705
Extinguishing System
fu e l Flow Indicating
709
7051
709!
741
741 i
Fuselage Panels
701
[NAC/Pylon Wing Fitting
701 i
729
7291
jo verh eat Detection
721
721 j
I Smoke Detection
7C1
701 |
Transfer Valves
709
(Grand Jota[ _
14M
I
709 !
3525
701
1434
Ш0
.
You may add a Timeline Slicer to quickly see the top or bottom 10 by quarter or other time
frames.
Lastly, to show how many parts sold more than 800 in quantity:
1.
Click the drop-down arrow of ‘Row Labels’
2.
From the menu select ‘Value Filters’ then ‘G re a ter T h an ...’
totuf '
I Sum o f QTY
I FUEL
I Row ta b e l*
POWER STRUCTURAL WtNG Gran
Jcrt A to Z
653
S ^ rt Z t o A
741
705
S o rt O p tio n s ...
709
C lear Filter F ro m
PA R T ”
[ a b e l F iller:
*
УаГие f i l t e r
*
[Search
Й [Select All)
701
^
£ le a r Filter
P
£ q u a H .~
a
D o e s N o t Equal.-.
i/J AC G e n e ra to r-A lte rn a to r
g r e a t e r T h an .,.
AC In v e rte r P h a se A d a p te r
< AC R e g u la to r
^1 A fte rn a to r G e n e ra to r Drive Bysterr
G re a te r T h a n Q r E q u al T o..,
* A um lhiiy S lru c tu fe
^ e s s T h a n .,,
Z B le n d e d W in g let
3 B o o st P um ps
L ess T h a n O r ЕдиаІ T o,,,
2 B u ix h ea d s
V
B e tw e e n .,,
-
3.
The following prompt will appear, enter the number '800’ in the field after the drop­
down box ‘is greater than ’
4.
Click the ‘OK’ button
The following will be the result:
Sum of QTY
Colur -
Row Labels
:T. FUEl
Alternator/Generatof Drive Systen
POWER STRUCTUftAi WING Grand Total
805
805
Auxilliary Structure
949
841
841
Boost Pumps
Bulkheads
SOI
DigiT-чІ RjeT Flow System
841
Engine Li britation System
849
949
801
841
849
Engmn- Struts
901
901
Fire Detection
837
837
( ir r- Protection
1065
1065
Fuel Dump Furl Н о ір
sei
881
Fdel Press л e .'i d ic in g
817
817
Fuel S-O.V.
an
831
Keel Beam
857
l:thium Battery
857
801
801
Longeron/Stringers
809
809
Panels
305
805
Spars
317
317
Wing Webs
Grand ТоЫ
SOSO
ISOS
857
B49
849
5911
1S146
To remove a filter
1.
Click the drop-down arrow of ‘Row Labels’
2
From the menu select Clear Filter From
3 Sum of QTY
C<
4
Row Labels
Fll
21
Sort A to 2
jjj,
Sfirt Z to A
Мезге Sort O p tio n s .,.
£kar filter From "PART"
Label Filters
ч/ I
V a lu e Filters
e a r th
Z [Select All)
И AC G e n e ra to r-A lte rn a to r
✓l AC In v e rte r Phase A d ap ter
: V : AC R eg u lato r
.
/A lt e r n a t e r .'G e n e ra to r D rive Syst era
CHAPTER 7
Introduction To Dashboards
In the previous examples, we added one Pivot Table per worksheet, in this chapter we will
demonstrate how to add more than one Pivot Table to a single worksheet, including how to create
and format a basic Dashboard.
In chapter 9, we will illustrate how to update (Refresh) data once you have a Pivot Table or
Dashboard formatted in a preferred layout.
A few things to remember when designing a new Dashboard:
1. How will your audience view the Dashboard, in paper form, on a website, mobile
device? You’ll want to be mindful of spacing and the use o f colors if your audience
reads the Dashboard on paper printed in black and white ink or limit the amount
information displayed if viewing on a mobile device.
2. Does your audience require separate views of the data? Perhaps a manger is interested in
only his or her own geographic area? You can add slicers to assist in filtering rather than
creating separate reports for each locale.
3. What are the data sources for your Dashboard and will the data be available on the same
frequency if you were to publish a daily or weekly basis?
4. How will you maintain your Dashboard? Will it require manual updating or will your
design allow the data to be refreshed when customers open the file? This may also
depend on required permissions to access the data source.
It’s been my experience to start small when creating a Dashboard, once your customers start using
the information, they almost always ask for more and request changes to the layout. You’ll want
to manage expectations. What seems like a simple fix to your customer may require a lot of data
preparation behind the scenes. It is important to balance the amount of time you spend creating
and maintaining the Dashboard with the benefits it provides.
Example:
You’ve been asked to create a monthly sales Dashboard to provide the following information:
1.
Quantity of parts sold by region and category, including a bar graph
2.
Top 10 parts sold, combined quantity and percent of total
3.
A pie chart with the percent of total sales by region
4.
Quantity of parts sold by region and month
1. Include a column that shows if the total sales were above, below, or even with the
previous month
The data is generated from a database query. You’ll receive a new report at the start of every
month for the prior month’s sales. Users will access this report online as well as in printed form.
The report will not be viewed on mobile devices.
The customer has included a whiteboard photo of how they would like to see the layout:
Dashboard
category
bdf
graph
QTY
ж
■v
v
p* chart
.0
r
■
xY*3- -
Г
category
*
OY&W|
1
---------Т П Т . 1 T~------------------------------ ---- --------------- --------- — Л
ЧДѴ
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
DashboardData.xlsx
You’ve reviewed the customer’s requirements and while they didn’t initially ask for the ability to
filter by time period or region, you anticipate this is something they will want andtherefore
decide to design accordingly. In order to build this Dashboard you will need to:
•
Create 4 Pivot Tables
•
Accommodate up-to 12 months of data
•
Insert 2 graphs
•
Add 2 slicers
•
Size to fit or be “shrunk down ” to display on one legal size (8 V x 14 inch) piece of
paper
•
Use colors on graphs and indicators sparingly, as you don’t know if the paper form will
be printed in color or in black and white ink
Adding Multiple Pivot Tables To A Worksheet
Pivot Table #1
Quantity of parts sold by region and category
Create a new Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
chapter 3 ‘Summarizing Numbers’:
1.
O p e n t h e D a s h b o a r d D a t a . x l s x s p r e a d s h e e t a n d h i g h l i g h t columns A :F ( select columns, not cells)
2.
F r o m t h e R i b b o n s e l e c t INSERT : PivotTable
3.
S e l e c t t h e ' New W orksheet ’ r a d i o b u t t o n
4.
C l i c k t h e ' OK ’ b u t t o n
A n e w ta b w i l l b e c r e a t e d a n d th e
‘PivotTable Fields’pane s h o u l d a p p e a r o n t h e l e f t s i d e o f y o u r
screen .
5.
R e n a m e th e ta b f r o m
‘S h e e tl’ t o ‘Dashboard’
From:
To:
i!
Dashboard
6.
In th e
1.
2.
3.
7.
Dala
®
•
‘PivotTable Fields’pane s e l e c t t h e f o l l o w i n g f i e l d s :
R E G I O N (Rows section)
C A T E G O R Y (Columns section)
Q T Y (Values section) Please note: when adding the Q TY fields, it will
default to ‘Count o f Q TY’. change to ‘S u m ’
C h a n g e th e la b e l n a m e s:
1.
2.
3.
4.
’
‘A3’ t o QUANTITY
C h a n g e c e l l ‘A4’ t o REGIONS
C h a n g e c e l l ‘B3’ t o CATEGORY
C h a n g e c e l l ‘A9’ t o TOTAL (this will also change cell ‘G 9 ’)
C h an ge c e ll
We’ll add the bar chart in the last part of this chapter.
Pivot Table #2
Top 10 parts sold, combined quantity and percent of total
1.
Return to the ‘D ata’ tab and highlight columns A:F
2.
From the Ribbon select INSERT : PivotTable
3. When you receive the C reate PivotTable prompt, select the ‘Existing W orksheet’
radio button
4.
Place your cursor inside the ‘Location: ’ box
X
Create P ivo tT a ble
Choose th e data th a t you w a n t to analyze
®
Select a ta b le o r range
la b le /R a n g e :
Data!SA:SF
■ ■Use an external data source
Choose C onnection...
C o n n e ction name:
Use th is w o rk b o o k 's Data M od e l
Choose w h e re you w a n t th e PivotTable re p o rt to be placed
■
N ew W o rksh e e t
®
Existing W o rksh e e t
Location:
Choose w h e th e ry o u w a n t to analyze m u ltip le tables
П
Add th is data to th e Data M od e l
OK
Cancel
1
5. With your cursor still inside the ‘Location:’ box click the ‘Dashboard’ tab and then
cell ‘A11’
1 ,4 1
-
REGIOU
A
11
iг
!Э
|a
QUANTITY
REGIONS
! * central
| & East
| 7 w «t
' а (blank)
1 9 TOTAL
!Ю
CATEGORY K J tl
POWER STRUCTURAL W IN G (blank)
- M
Ц
M
Create Р м л Т іЫ і
C lin 01 » MlF M l M ilt you МАГЛ (« l i u l | ; t
•' jflHt *tabKOfrrnet
Т*ЫгKinjr
О У»
f Ипл»і d m ш ик*
lit
;и
!«
14
'IS
116
£4ie&« vrfitr* >eu w*nt (гч Р* о і Гіь і * up crt ie be
О
w o ik ih H t
*
£ ii:t m g W s r t i h f f t
117
^otltion- 0*Illb№d!^ASlT|
!is
|l9
120
£4i do i t w t i r t t i d y o u M n t to іп л іу з с пціПнрІе t i b l c t
О Add
data to tin t О іг » M o d d
[21
OK
122
1Э.^
Djsi’ tsord
Data
6.
Click the ‘OK’ button
Your screen should look similar to the following:
TOlrti
С дпсей
•ivotlabfe Fields
CATEGOer '
qu aw tttv
FU Q
R EGIONS ■
P O W E i S T fW T T U W
W IN G ( № L )
H H H
cw irai
East
2.622
Ш
690
1Д И
5 .0 Ч
west
2 .Ж
LB7
336
LM 5
1.712
2,541 IW
I b la n k ]
rr«l MW
TOT A t
696 MSI
L«4
Ш Mil
To buiild я r * p o n th e e i# I le id i h o m s
Р т ѵ р ІІіЬ І* FM kl Ui1
L*>*j l*-!ih i#
T
F.tTcn
0«
I I-
Dashboard
7.
In the ‘PivotTable Fields’pane select the following fields:
1. PART (Rows section)
2. CATEGORY (Rows section)
3. QTY two times (Values section) Please note: when adding the Q TY fields,
it will default to ‘Count o f Q TY’, change to ‘S u m ’
A
e
С
с
Pivo tT ab le Fields
M
1L R ow L ib e ls
12
13
14
AC G e n e r a to r-A lte rn a to r
POWER
AjC I n v e rte r P h a s e A d a p te r
T SumofCTTY S um ofC lT Y 2
«И
6 IE
«1 4
61В
**s]
ьві
С hsase Fields, to acid "a re po rt
SiJirch
IS
POWER
«3
665
□
1*
AC R e g u la to r
714
ж
POWER
714
7J4
□ NAMl
и ГАТТGORY
757
757
E; pwti
757
757
П еом с а п
■71
*71
371
671
17
IS
19
2»
21
A lte r n a to r /G e n e r a to r D rive S y ite m
POWER
Auni 1liary S tru c tu re
WING
7412
742
23
WING
"4?
742
24
- R nosl P u m p i
7ЛЧ
7W
7S9
7Е9
21
BltfmJWI W in jltf t
25
FUEl
»
S B u lk h e jtf *
27
23
25
»
11
D
11
14
.IS.
WING
- C e n te r W irif Bon
WING
D igital F u e i F lo w S y stem
FUEL
E ngine lu b r i c a t io n S y stem
FUEL
t njjir’.e M o u n ts
_____ M
734
734
734
Я /
717
717
7J7
_____ и >
7Б1
и з
7EJ
782
« * гqirtт иа :
ТАІ
№2
Ш
669
__ Ѵ Л № ............................... ........ 4ИЯ .....
Why are the ‘2 Values’ fields defaulting to
Count instead of Sum?
When Pivot Table source data contains blank rows,
R E G I0 I4
QTy*
M a re ta b le s ...
Drugfrddt brtwten йгёіі bele^
T Fitters
Л Columns
E Viluts \
Wd'ii dtfau It to \
o f
d bt
flaws
""""pART
C A TE G O R Y
o
v
r
.
th a r -g i to S * w
\
\
3C Values ^
-
S um erf Q T Y
»
S um of Q T Y Z
in this case because w e’re selecting columns
(Data!$A:$F) instead of a specific cell rage
(Data!$A$1:$F$3889) our source data contains blank
rows. For some reason when this occurs Microsoft®
has decided to default fields going into the
Values’
section to count. In order to prepare our Dashboard
to receive new data, the best practice is to use
columns instead of a specific cell range.
If you search the web, users have applied work
arounds such as changing the blank rows to contain
values of zero. For data quality and troubleshooting
purposes, I do not modify source data unless required
for ETL (Extract Transform Load) processes.
8.
Click the drop-down arrow of ‘Row Labels’ (cell ‘A11’)
9.
From the menu select ‘Value Filters’ then ‘Top 10’
Sum o f QTY Sum of QTY2
63*
6 IB
11 Row Labels
Select field:
PART
533
63 S
z|
JortAtoZ
6flS
6*5
ІІ SartZtoA
6S5
635
"
7І4
734
M ore Sort Options...
734
734
>T
J ear fitte r From P.£
757
757
Label F ilte r
757
757
Value Filtejs
Search
\± (Selert All)
P
Equals...
Л
Does Not tqual...
v AC Generator-Alternator
|< AC !n
r Pha s« id s p t« r
Greater Than,..
* AC Regulator
Greater Than O f Equal To..
Alternator/Generator Drive System
Less Thin,..
/ AiorilBary Structure
И Blended W inslet
i< EcDit Pumps
Less T h in Or Eguel T n „.
B e tw e e n ...
. Й Bultheads
с
>
ok
Cancel
N et Between...
J a p 10..
732
_-LJ__ £
.
10. The following prompt will appear, click the ‘OK’ button
782
Next, w e’ll change the display so the ‘C ategory’ field appears as a column
11. With your cursor in cell ‘A11’ from the PivotTable Tools Ribbon select the tab
DESIGN
12. Click the drop-down box ‘R eport Layout’ then ‘Show in Tabular Form’
We also need to hide the 'PART’ subtotals
13. With your cursor in cell ‘A11’ from the PivotTable Tools Ribbon select the tab
DESIGN
14. Click the drop-down box ‘Subtotals’ then ‘Do Not Show Subtotals
15. Click the second ‘Sum of QTY’ drop-down box and select ‘Value Field S ettings...’
The following dialogue box should appear:
16. In the field ‘C ustom N am e:’ change to %
17. From the 'Show values as’ drop-down list select ‘% of G rand Total’
18. Click the ‘OK’ button
\ 1
part
.t
au кII1iary structuce
BOObt PllltSfj".
Digil.il FUfI flow SystHTii
FrtglflP LJbrit ril i f j r i Sy^ttm
FllgiriP SthLK
fire Pi election
: 7
is
Fof 1Dump f lj e 1 Нои
Keel Beam
20 - Spars,
21 - Wing Webs
.. Grand Total
13
CATEGORY
WING
FUEL
FUEL
FUEL
WING
POWER
FUEL
STRUCTURAL
WTNG
WING
Sum of Qrv
%
871 10.60%
7S9 9,61%
783
ЪЫ%
782 9 5 2 *
825 10.544
ЭД7 11.77*
822 10. OIK
812 9.89%
772 9.40*
791 9.63*
8214 ЮОЛО%
19. Change the label names:
1. Change cell ‘A11’ to TO P 10 PARTS SOLD
2. Change cell ‘C11’ to QTY SOLD
3. Change cell ‘A22’ to TOTAL
A
В
С
CATEGORY '
QTY SOLO
%
?
10.6%
D
10
11
TOP 10 PARTS SOLD
12
Auxi 11ia ry Structure
13
- Boost Pumps
14
- Digital Fuel Flow System
15
16
Д
^ ^ /IN G
9.6%
FUEL.
Engine Lubrication System F U E L /
- Engine Struts
871
WtrfG
783
9.5%
782
9,5%
825
10.0%
17
Fire Protection
s ' POWER
967
11.8%
18
Fuel Dump Fuel Hose
FUEL
822
10.0%
19
Keel Beam
STRUCTURAL
812
9.9%
20
Spars
WING
772
21
Wing Webs
/
WING
22 TOTAL
791
9.6%
8,214
100-0%
20. Change the number format for the ‘QTY SOLD’ to include a comma (zero decimal
places)
Pivot Table #3
Quantity of parts sold by region and month
1.
Return to the ‘D ata’ tab and highlight columns A:F
2.
From the Ribbon select INSERT : PivotTable
3. When you receive the C reate PivotTable prompt, select the ‘Existing W orksheet’
radio button
4.
Place your cursor inside the ‘Location: ’ box
5. With your cursor still inside the ‘Location:’ box click the ‘Dashboard’ tab and then
cell ‘A26’
The ‘Location:’ box should now have Dashboard!$A$26 entered
1
1
3
QUANTITY
CATFGOfiY -
л
Ш CilONS
(Utl
5
5
Central
East
PO W 1K
K lk ItJR i W hNIj (Ы.лііс]
2.693
АЭС
3,0 6 5
3,070
2.541
2 ,7 0 0
6%
3,051
в,эва
1 ,6 1 7
036
2,915
0,752
7 W est
а [b tin k j_________________
9 тоіді
t.OB 1,111 9,011
чо
і
Ч
T O P 10 ПA R Ti « H D
.1
CATEGORY ■ Q T Y H H D
і
A u i l l l l i r y S tructure
щ
С'Ы I t РъѵП іЫ *
из &ОЯѴІ rtJINfK
M u №( dim tnjt )Фч »*nl I e
!и D l j l h l h i d I lo w l y i t n n
'*1j(4<*• 01*иці
1
Enflru*
l
u
b
i
l
r
j
l
l
o
n
S
y
M
r
m
f
Щ
1 - Г,
Engine Struts
V
I
F h e P ro te c tio n
P
■» F u(‘l D u m p Fuel H o s e
іU Keel Seam
Iо Spn
]аі WinjjWehs
122 TOTAI
|23
IlW rlU rt**
О
TOTAL
2.522
pttl<U V
26,MO
T
X
T
in fdin4i diii
F
*
ChaoK л+ m f jo u m m H it Prrotfiol* i t p g i t t t b t pla<td
О tt*« WaiistiHi
• i m ln g W w l l h l l
124
і
і |5
:h-jii.it йтцтги* j
;
,.лит и a rj-,:* murtiplc tables
□ Add this дли to Uh DaLi Mm M
'27
і
I <* I
|23
1 .
In the ‘PivotTable Fields’pane select the following fields:
1. REGION (Rows section)
2. EOM_DATE (Columns section)
3. Q TYtwo times (Values section) Please note: when adding the Q TY fields,
it will default to ‘Count o f Q TY’
6.
Click the ‘Count of QTY* drop-down box and select ‘Value Field S ettings...’
I------------------------------I Drag fields between anas Ь е к ж
1T
FILTERS
I В COLUMNS
■ ROWS
REGION
EOM.DATE
*
I Values
3
>- VAiUES
v
Ccunc o f QTY
r
1 Count Of QTY2
T
7.
In the box ‘Summarize value field by’ select ‘Sum’
8.
In the field ‘Custom Name: ’ change to TTL
9.
Change the number format for ‘TTL’ columns to include a comma (zero decimal
places)
10. Click the ‘Count of QTY2’ drop-down box and select ‘Value Field S ettings...’
11. In the box ‘Summarize value field by’ select ‘Sum’
12. In the field ‘Custom Nam e:’ change to +/Value Field Settings
Ch<?л
Source Name: QTY /
t
C u s to m N am e :
рл |
f s u mni_arize_Valие5_Ёл_І Show Va Lues As
Summarize value field by
Ch oose th e type o f c a lc u la tio n th a t y o u w a n t t o use t o sum m arize
d a ta f r o m tfte selected fie ld
iSum
Count
Average
Max
Min
Product
“Т Я
-4
C h a n g e to :
$uyvi
Number Fotmat.
13.
Select the tab ‘Show V alues A s ’
V
OK
Cancel
14. From the 'Show values as’ drop-down list select ‘% Difference From’
15. Select Base field: EOM_DATE & Base item: (previous)
16. Optionally, change the number format percent to one decimal place
17. Click the ‘OK’ button
18. Change the label names:
1. Change cell ‘A28’ to REGIONS
2. Change cell ‘B26’ to MONTH-YR
3. Change cell ‘B28’ to TTL
4. Change cell ‘A33’ to TOTAL
(Ы й п к )
W itt a p p e a r a t
t h e e v \d o n t h e m o n t h s c o f u m n
A
25
26
1I
Щ
i
28 REGIONS '
29 Central
30 East
31 West
32 (blank) /
33 TOTAL *
for Excel® 2 0 1 3 -> users
f
G
С
D
E
“ ТСКдпде label
e
■
I
M ONTH ■YR ’
(blank)
TTl
>
31-Jan
*h
TTL
28 Feb
+/-
1,015
1,048
1,037
#NULL!
ЗД00
+/695 -31.5%
720 -31.3%
715 -31.1%
HNUU!
TTL
2 ,U O -31.3%
Formatting The Dashboard
We’ve added 3 of the 4 Pivot Tables for this Dashboard, before going further, let’s format the
tables to improve readability.
Due to page size limitations, the image o f the entire Dashboard is not displayed:
A
В
3
QUANTITY
CATEGORY -
4
REGIONS t
FUEL
_A
i
С
D
E
F
G
| blank}
TOTAL
H
2
POWER TtUCTUR, WING
5
C e n tra l
2 ,6 2 2
2 ,6 9 3
690
3 ,0 6 5
9 ,0 7 0
6
East
2 ,5 4 1
2 .7 0 0
696
3 .0 5 1
8 ,9 8 8
7
W est
2 ,3 9 4
2 ,6 3 7
836
2 ,9 1 5
8 ,7 8 2
8
(b la n k )
9
TOTAL
7,557
8,030
2,222
9,031
26,840
CATEGORY -
QTY SOLO
10
11 >P 10 PARTS Л
12
■A u x ilia ry S tri W ng
*
£71
1 0 .6 *
13
■ B cw it P um p* FUEL
769
9 64
14
d ig ita l Fuel FI FUEL
783
9 5%
15
Engine L u b rk FUEL
782
95*
16
Engine S tru tt WING
82 5
10 0 *
17
Я ге P r o te ttk POWER
967
11 8%
13
- Fuel Dum p Ft FUEL
822
1 0 .0 *
1?
- Keel Beam
STRUCTURAL
812
9 9%
20
- Spar*
WING
7 72
9 4 *
W ing W e b *
W NG
791
9 -6 *
8,214
100.0%
21
22 TOTAL
23
24
25
26
MONTH - YR
27
(blan k)
v
31-Jan
28-Feb
TTt
m
TTL
3 1 -Mar
23
REGIONS
29
C e n tra l
1 ,0 1 5
6 95
-31.5%
9 91
4
30
East
1 ,0 4 8
720
-31.3%
9 45
3
31
W est
1 ,0 3 7
7 15
-3 1 .1 %
9 45
3
32
(b la n k )
2 ,8 8 1
3
33 TOTAL
~ ^]
*/-
■NULL!
3 ,1 0 0
*h
TTL
#NULL!
2 ,1 3 0
-3 1 .3 %
1.
To change the display of formula error messages (such as #NULL!, #DIV/0!), select cell
‘E32’
2.
From the PivotTable Tools Ribbon select the tab Analyze
3.
Select the PivotTable drop-down box, then the ‘Options’ drop-down box, then 'O ptions’
File
Hom e
Insert
Page L a yo u t
ф T 3
A c tiv e Field;
P ivo tT a ble
D raw
Ц Field S ettings
-*
G roup
D rill
D rill
-=
D ow n
Up-
“
fx
#N ULL!
Active Field
P ivo tT a ble N am e;
P ivo tT a b le ^
С
D
POWER
RUCTURj
2 .6 9 3
690
O p tio n s
1|[П
Sh о w Rep o rt Fi Iter £a g es
j.
G e n e ra te G e tP ivo tD a ta
4.
Under the ‘Layout & Form at’ tab, check the box ‘For erro r values show:’
5.
Click the ‘OK’ button
6.
To filter out the (blank) columns and rows, select cell ‘B3’ click the drop-down arrow
and uncheck the (blank) field
7.
Click the ‘OK’ button
8.
Repeat steps #6 & #7 for cell ‘B11’ (DO NOT REPEAT FOR CELL ‘B 26’)
9.
Select cell ‘X27’ (Total TTL), right-click and select 'Remove G rand Total’
10. From the Ribbon select the ‘VIEW’ tab and uncheck the ‘Gridlines’ box
В Ъ
file
It О я
i t
К оте
Inset
than#
г
Page Layout
F o im jta
Я Fwniuli &ai
Page E ie ik
Preview
Page Cuslom
Layout
Vievn
Data
Review
и
0Щ
10016 Zoom to
Selection
rtoiK&oot Viewi
11. Click cell ‘A3’, and then from the PivotTable Tools Ribbon select the tab DESIGN :
PivotTable Styles
12. From the PivotTable Styles drop-down, select a format style you like
13. Repeat steps #11 & #12 for PivotTables in cells ‘A11’ & ' A26’
14. In cell ‘A1’ enter the text ‘Monthly Dashboard’
15. In cell ‘B1’ enter the text ‘Airplane P arts by Region’
16. Increase the font size of ‘A1’ & ‘B1’ to 18 and bold, optionally you may change the font
type to ‘Consolas ’ and color o f your choice
17. Right-click on cell 'A 3’ and from the pop-up menu select ‘PivotTable Options’
2
3
4
PO\ STRUC W lf Grand
1^1
5
6
Format Cells...
Number Format...
7
[~0 i
^
11
12
j+ № 7 0 .
!й #
i
6Э6І m
3 9S S
Refresh
S36{ m
37S2
m
26840
7777
“
$ort
10
69p №
j OS
S
3
І tffl
Rem ove "Sum of QTY"
Summarize Values By
A.
rh,
°*u
Sun%
wm*t
ІГ
I
Show Values As
№
.61%
I Co
Value FWd Settings.,,
tm
1.53%
15
PivotTable Options.,.
ff#
1.52%
16
Hide Field List
m
t ;ftttftti
m
*
13
14
17
13
P Fuel Dump F FUEL
m
-
15
н Keel Beam
STRUCTURAL
m
W IN G
m
І.ВЭК
i .40%
21 a w in g W ebs W IN G
m
1.63%
20 6 Spare
!
S S
Grand Total
18. Under the ‘Layout & Form at’ tab, uncheck the box ‘Autofit column widths on update’
19. Click the ‘OK’ button
20. Repeat steps #17 - #19 for cells ‘A11’ & ‘A26’
21. Then expand columns widths, so no # symbols display
To change the sort order for the ‘T O P 10 PA R TS S O L D ’ to descending
22. Click the drop-down box for cell ‘A11’ and then ‘More Sort O ptions...’
23. Select the ‘Descending (Z to A) by:’ radio button
24. Click the drop-down box and the ‘%’ option
25. Click the ‘OK’ button
Sort (TOP 10 PARTS SOLD]
?
X
Sort o p tio n s
G
m anual (you can drag
items to rearrange them ]
( ) Ascending (A to Z) by:
| TOP 10 PARTS SOLD
®
h
d e s c e n d in g (Z to A] by:
Summary
Sort TOP 1C1PARTS SOLD b y % in desce nd in g o rd e r
M ore O p tio ns...
We’re almost done!
OK
Cancel
However, one of the trickiest (and most frustrating) aspects about
formatting Pivot Tables is keeping the desired format when new data is added, especially when
working with date values, in this case when new months are included. You’ll learn more about
adding data in chapter 9.
Meanwhile, in order to prepare our Dashboard to keep the formatting for all new data.
Sometimes, we have to perform redundant and non-intuitive steps. Our preferred formatting for
the monthly Pivot Table is as follows:
•
Date displayed as M M M -Y Y Y Y (i.e. Jan-2017)
•
The month and year centered over the columns ‘T T L ’ and ‘+ /-’
•
Hide the (blank) rows and columns
date Сок**»*
д
а
д
*
*
{фгыліънд
1* * * * * *
j
MON IH-YK | 3
Jan-2017
REGION*
Feb-2017
TTL
TTL
Central
1015
-3 1 5 *
fa st
1048
-31.3%
w e tt
t0 3 7
Qrdrtd Total
3100
-31.154
2130
I
rtrt-ths
udde-d
L ____________________________________________________________________________________________________________________________________________________________
26. Right-click cell ‘B26’
27. From the pop-up menu, select ‘PivotTable Options’
28. Under the ‘Layout & Form at’ tab, check the box ‘M erge and center cells with labels’
29. Click the ‘O K ’ button
P ivo tT a ble O p tio n s
Pi votTa bl e N a m e
Layout Bi Form at
X
?
Pi votTa bl e3|
Totals & Fitters
Display
Punting
Data
A lt Text
Layout
0
M erge and center cells w ith labels
W h e n i n £0m p a rt f о rm iл d e nt r o w la b e li: 1
!
ch a ra cte r^)
fiisplay fields in re p o rt filter area- D ow n, T hen Over
R eport filter fields per colum n:
0
t
Form at
0
For ir r o r values show :
0
For em pty cells *how :
1
0
I A u t o f i t c o lu m n w i d t h s o n u p d a t e
Preserve cell f o r m a t t in g
o n u p d a te
OK
Cancel
To apply the date format we need to ungroup the field
30. Right-click cell ‘B27’, from the pop-up menu, select ‘Ungroup’
X W est
8 TOTAL
0=1 £°РУ
9
10
11
TOP 10 PARTS SOLd E
CATEGORY Й 1
12
о Fire P ro te ctio n
POWER
13
а Ли кгііи гу St ructu re
W ING
14
о Engine S tru t*
w in g
;
fuei
;
15 в Fuel D um p Fuel H<rw
[Іг|
Format Cells...
[3 1
Refresh
Sort
‘
Filter
v
S u b to ta l "EOMLDATE"
16
■ Keel beam
STRUCTURAL
17
■ W in e W e b *
W ING
^
£*pa n d /C ol Ia p *e
18
*& с ю И Pum p*
FUEt
; a@]
£ro u p » »
19
■ Digital Fu d Flew 4 * 1 * m f UEi
,
jjngroup...
го в Engine Lubrication S yite FUEL
31
eSpars
WING
M ove
23 TOTAL
x
Remove "EOM_DATE"
Lq
Field Settings...
33
24
25
PivotTable Opti on s...
26
M O NTH-YR E ?
27
________(blank)
REGIONS
Hide Field List
m
You’ll notice when we did this our ‘+/- percent’ column reverted back to the sum of quantity (in
Excel® 2016 only) . I assume Excel® did this because we ungrouped the field. Yet, it is still
perplexing as to why it did not keep our 'Show values as’ commands. Therefore, we must re­
apply steps #13 - #17 from above to apply the ‘+/- percent’ column.
I deliberated about structuring this lesson differently to avoid having to perform these
redundant steps. However, I considered this to be a good example of some of the challenges you
may experience when building Dashboards.
Formatting glitches occur frequently. Don’t be
surprised if you find yourself spending a sizable amount of time addressing them.
MONTH-YR
1/31/2017
REGIONS
(blank)
After changing the ‘+/- percent’ column back to display the ‘% Difference From’ the previous
month
31. Highlight cells ‘B27:W27’ and right-click cell ‘W27’, from the pop-up menu, select
‘Format C ells...’
H ig h lig h t Ы І£
tfrc J ?
A
22
,
С
&
TOTAL
J8 2 7 . W 2 7 * , f i g h t -
s & i e c t 'F o n w i t f t C z t t e .- .'
D
t
£
G
w
й*2 И
23
о т ,и
24
V
25
26
1/ І І / 2 0 1 ?
28
29
______ ^
■1
M ONTH Y R H
11
R H jJ f W jS
Щ
C e n tra l
30
m
H I
I
4
ѵ -т
ж
* /-
.
Е9 5 І
- 3 1 .5 * i
1 .С-3 9 І
?2q|
- s i.a %
1
ГГ|
945!
л '
д
-
1
* /■
1 ,0 1 5 1
1
-
Ѵ і
\
i p I f£0 1/
2/Z S /lO l?
* /-
.
x
*
f a r m r tC d k ..
3 1 .3 %
32. Under the ‘Number’ tab select ‘Custom’
33. In the 'T ype:’ field enter ‘mmm-yyyy’
34. Click the 'O K ’ button
?
F o rm a t Cells
Num ber
A l ig n m e n t
Font
Border
Fill
X
P fo te rtio n
C a te g o ry :
G e n e ra l
N um ber
Sam ple
J a n -2017
C u rre n c y
A c c o u n t in g
Date
Time
P e rc e n ta g e
F rirtlo n
Scientific
Tejft
Іуре;
т т т - у у у і|
G eneral
0
A
ООО
* ,• • 0
• ,• • 0 . 0 0
• .• •O J ;J P e d ]|* ,* * 0 (
•^ •O .O O J ’I», *•0 .0 0 )
••O.OOJ-fRed]!*, ••0 .0 0 (
*,
V
D e le te
Type th e n u m b er form at cod e, u sin g o n e o f th e e a s t in g c o d e j as a sta rtin g parnt.
OK
C ancel
35. To filter out the (blank) columns and rows, select cell ‘A28’ click the drop-down arrow
and uncheck the (blank) field
36. Click the 'O K ’ button
I know these formatting steps may have seemed onerous at times, but they have prepared our
Dashboard to receive to new data and keep our existing formatting.
Due to page size limitations, some columns have been hidden:
Г Monthly Dashboard
I Airplane Parts by Region
c f lH u v
QUANTITY
RFGIONS
E |
UNI
D
POWFK
flK U C T IW U
C m tra l
w
EHt
Z_70Q
Ш Ш ЁВ Е Щ
WWt
Щ
U№ tU H A K lS M 3 !! 'B J
вi
г
1
U J l
t^ n
7
1
%
311%
МЛНЬ
и
■ Гкуялі P u irip i
Н ІЦ
ш
1
■ W wi|| W i-bh
f
го и ст о м
1
100%
■ K r r l flr-nm
Г
fu ti
с
10 OK
■ I u rl hum p f u rl Н м г
1
w m
i ІГАІ
І.7 К
«дао
ЙІЛЦІПГ *ВІ ГШІ1
И «Ц и п
*JW
2.S15
ѴНШі
Ы .І Ц М І Г 1 llfell h ЛІ іі П'і
Я !7TQ
im i
ІЙ
U lttm b
T
д
ТОТДІ
3.06*
Т Ш
* Л н .* А » гу I t r u r iu f B
в
<■
І
11 I'p o l retinn-
:л
?J57
с
TOTAL
WRK
30 G 4
д
***
г
а
9 6V
9**
l№
1н я п
ю
з
* n
f 4%
M l*
Adding Charts To The Dashboard
Pie chart with the percent of total sales by region
To add our first chart w e’ll need to add another Pivot Table, however the customer has requested
only the pie chart and not the table displaying the percent o f sales by region. Therefore, w e’ll
create the Pivot Table on a separate tab to save space and place only the pie chart on the
Dashboard.
1.
Return to the ‘D ata’ tab and highlight columns A:F
2.
From the Ribbon select INSERT : PivotTable
3.
Select the 'New W orksheet’ radio button
4.
Click the 'O K ’ button
A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side of your
screen.
5. Rename the tab from ‘Sheet2’ (you may be a different sheet#) to ‘PieC hart’
6.
7.
In the ‘PivotTable Fields’pane select the following fields:
1. REGION (Rows section)
2. QTY (Values section) Please note: when adding the Q TY fields, it will
default to ‘Count o f Q TY’, change to ‘S u m ’
Rename PivotTable to ‘Pie C hart’
■A
*5*
FI!i
e
Hem*
a
□
i
I Ргѵ?ИІіЫ с Ч р л с
Dfi
----- -------------- 1
|
A ■r .fiFl^ld
1 PifrCh*rt
FIIGION
1( p] Qpttonf *
i
PfvOlT-аЫг
I
I
1
1
1
A
i
I
i
i
I
i
1
i
i
!
0
!1
I 2
!
1
! 3 !R o w u b o ls - [su m of Q n r
; 4 C enlral
WTO
!
15
8.
i
East
figea
|
I h W e rt
! 7 \ blank)
cm
1 В G rand Total
2Ъ340
i
1
1
|
From the PivotTable Tools Ribbon select the tab Analyze : PivotChart
Sign in
m
ЗШ Л|Ѵ
1:‘c
У Tffl m e whet you want to cfg
Fields, Items, St Sets *
[ІЦ 5 d « t ■
!..4 M o ve PivotTable
Actions
9.
PivotChart Recommended
PivotTables
fools
The following prompt should be displayed, select the ‘Pie’ option
10. Click the ‘OK’ button
11. Click on the Pie chart and from the PivotC hart Tools Ribbon select the tab Design
12. Click the drop-down for ‘Quick Layout’ and then ‘Layout 1’
Optional steps: hide the Field buttons, righ t-click over any Field button and select the appropriate hide option.
legend, by selecting the legend and pressing the delete key on your keyboard.
Remove the
You may also change the color scheme, in this example I have chosen the first blue
Monochromatic option
13. Change the chart title from ‘Total* to (% o f Sales by R e g io n ’
T ----- 7
Tot^l
Vffl
Genir
54*
E
1
ia*
f
V
We’ll now move the Pie chart to the Dashboard, by simply cutting and pasting.
14. Click on the Pie chart and press (CTRL+X) on your keyboard or:
о From the Ribbon select the
‘H O ME* tab
о
Click the ‘Scissors’ icon
15. Click the ‘Dashboard’ tab
16. Place your cursor in cell ‘G 3’ and press (CTRL+V) on your keyboard or:
о From the Ribbon select the
‘H O M E’ tab
о Click the ‘P aste’ button
A
В
С
D
E
F
Monthly Dashboard
1 Airplane Parts by Region
-----p>-e
£ ___
1
3 |
4
Central
ъ 1
QUANTITY
ftLCilDNS
В
CATEGORY В
FUil
^
1
POWER
6 Lasi
ТИ ш ш Ш Ш І
7 ' W rit
H D
S TOTAL
7,5S?
i,o io
9
10
11. TOP 10 PARTi ЗДШЩ CATOORV B QTY 5010
W7
12 ■ Fire Рѵлі r?c1tan
POWER:
WttlC*
15 ■Auxiliary 5tPWlW€
871
14 в Епдое Strutt
WING
Bl25
15 ■ Fuel Dump Fuel Hast FUEL
612
STRUCTURAL
Eli
16 a KcH Beam
bTHUCTUflAl
WING
TOTAL
% of Sales by Region
HI
ЁЭН-Н
Ѣ7І2
i,lU
*.011
2b^44
%
11S4
10.64
LG D5i
10 DS
9 9%
Lastly, w e’ll add the bar chart for 'quantity of parts sold by region and category’:
17. On the ‘Dashboard’ tab, click cell ‘A3’
18. From the PivotTable Tools Ribbon select the tab Analyze : PivotChart
19. The following prompt should be displayed, select the ‘B ar’ option
20. Click the ‘OK’ button
21. Drag the chart near cell ‘L3’
22. Rename Chart Name to ‘B arC hart’ (see step #7 above)
23. Click on the Bar chart and from the PivotC hart Tools Ribbon select the tab Design
24. Click the drop-down for ‘Quick Layout’ and then ‘Layout 3’ (see step #12 above)
Optional steps: hide the Field buttons, right-click over any Field button and select the
appropriate hide option
You may also change the color scheme, in this example I have chosen the black Monochromatic
option
25. Change the chart title from ‘C hart Title’ to ‘Category Sales by Region’
26. Save your Dashboard, you may keep the same filename or name to something
different
We’ve now fulfilled the customer requirements for delivering the Dashboard. To add additional
functionality with slicers & performance symbols, please continue to chapter 8.
To learn about refreshing Pivot Table data see chapter 9 and to protect your Dashboard, please
see chapter 10.
CHAPTER 8
Adding Slicers and Performance Symbols To Your Dashboard
In this chapter we explore two ways to enhance your Dashboard by using slicers and performance
symbols. Building on the Dashboard we created in chapter 7 we will add:
1.
A Timeline slicer
2.
A Region slicer
3.
Performance symbols (up / down arrows) to the sales by month Pivot Table ^
These enhancements will provide users with electronic or online access to the Dashboard the
ability to examine the data by different time segments and regions. In addition to this, by adding
symbols to indicate if sales were above or below the previous month, customers can quickly
glance at the data and know how performance is trending, without the need to study the detail of
the Pivot Table report.
Slicers
1. Open the Dashboard spreadsheet you created in chapter 7 and select rows 3:6
2. Right-click and from the pop-up menu select ‘Insert’ (4 blank rows, should now be
added between the title and first Pivot Table)
3.
Click on cell ‘A7’ and from the PivotTable Tools Ribbon select the tab Analyze :
Insert Timeline (for detailed instructions on how to insert a Timeline slicer please
see chapter 6 )
4. When prompted click the ‘EOM_DATE’ checkbox
5. Click the ‘OK’ button
6. A Timeline slicer should now appear, drag to the area near cell ‘D1’
7. Right-click on the newly added Timeline slicer and from the pop-up menu select
‘R eport Connections...’
8.
When prompted, select all checkboxes
Report Connections (EOM_DATE)
?
X
Select PivotTable and PivotC hart reports to connect to th is filte r
Name
И S3 PivotTabiel
PivotTableZ
0
PivotTable^
nil
0
0
m
PieChart
Sheet
D a sh b o ard
D ashboard
D ashboard
PieChart
OK
9.
Cancel
Click the ‘OK’ button
10. From the Timeline Tools Ribbon under ‘Options’ go to ‘Caption’ and enter the new
name of ‘Time Fram e’ (for detailed instructions on how to change captions please
see chapter 6 )
11. Click on cell ‘A7’ and from the PivotTable Tools Ribbon select the tab Analyze :
Insert Slicer
12. At the prompt click the ‘REG IO N ’ checkbox
13. Click the ‘OK’ button
14. A new slicer should now appear, drag next to the Timeline slicer
15. Right-click on the newly added REGION slicer and from the pop-up menu select
‘Slicer S ettings...’
16. When prompted, check the box ‘Hide items with no d ata’
17. Click the ‘OK’ button
Slicer Settings
Source Njm e REGION
Na mf t a и s* in f о пгщ Іл t
fja n f
Sli cer_ REGION
REGION
Hesdtr
0 pupIa/hridгг
£ *p !lcn ;
REGION
Item Sorting and Filtering
Ф
0
A i « n d < n g (A І 9 Ц
hide ‘terns with no daia
t f s u a l l } i n d i c a t e i t e m i w ith , n o d a t a
О D««nflina IZto
[2 ] U s » G lis te n * l n n
so rtin g
s n o w i t e m s w i t h n o c ta la l a s t
S h o w i t e m s d e l e t e d Т ю го t h e d a t a s o u r c e
OK
C ancel
18. Right-click on the newly added region slicer and from the pop-up menu select
‘R eport C o n n e c tio n s.’
19. When prompted, select all checkboxes
20.
Click the ‘OK’ button
Test the slicers by clicking on different combinations, you should see the Pivot Tables and charts
expand and contract as you click.
PLEASE NOTE!
Slicers are filters, when the 'Clear filter’ button is
Tl
selected * any previous filters used, including those
we applied to hide (blank) columns & rows will be
displayed.
/ЬГдрк) coIhf*»*» £■ rw*
Іамк wM" SJrfsr j01 N
ш ь * A »*“ *** —Ь
\
MONTH-YR □
R R ilO N i
Jan-2№
TTL
В
Central
East
......... И Г ^ ^ І И ............
TTl
TTl
,
-t
-2 1 .5 *
1
-2 1 .3 4
W «t
{Ылпк)
TOTAL
Lbl^nlfl
fe b iO lf
f/
-J I-IK
1
здм
tl»
-M .1 K
1
]
Performance Symbols (up/down arrows and other indicators)
1.
Open the Dashboard spreadsheet you created in chapter 7 and select all +/- columns
in the ‘Quantity o f parts sold by region and month’ Pivot Table.
An easy way to accomplish this is by hovering your cursor near the line 'C32’, wait
for the black down arrow to appear and click so all +/- columns are now selected.
(See image below)
2.
W ith all +/- columns selected, from the Ribbon select HOM E : Conditional
Formatting drop-down box
3.
Select ‘New Rule . ’
if lw r t
Draw
).#ycut
F e e m y iis
Dqta
R fw *
V i* #
О д о кд о г
А ллІу?г
Пччідп
о * и іт і ю п і і
F o rm a t a s
СНІ
F a .- rr .* f :ir i.j *
ТлЫ е ■
S ty le s *
*
]a p /ltif(liM ti f t u l n
3
tabsr Sciln
щт
MOffTH TH D
І И - 2 6 І7
н іи ю н г
C t f ft n i
f drll
w «t
В
m
I
Ю 15І
1 L M flj:
1.Ю7Г™
Іе Ь Д О И
* /-
m
№
ffl
*i
Ш
n
№
3 i ъ%
» i
7»
-І1 Л
945
m
З І іъ
W
J .IJ S
-iu hJ
j. f t i n
ж
lU t t ilj
FOTAi
i rlOO
4.
The following prompt will appear, select the radio button ‘All cells showing "+/-”
values’
5.
Click the drop-down box for Format Style: and select ‘Icon Sets’
6.
Click the drop-down box for Icon Style: and scroll-up to select the up/down arrows
Мел Formatting Rule
Дррі* Пик То
X
«SCS33 ^CS37 SES3J5ES3' SGSllSGS37,UiJ3:S1137,HtH3 5*S37,JWS3tSWi3 t
i[ :♦. ] All
1* cell;" j h o g i r q ' -
* a lu » i* '
» * 4>pi™ to
О A|1 t^is thownija
v*iufi for “
** + / -
S t i t t l л Rule Typt
- fotmtt iii ctinbind intum ими
* F o r m a t o n l y < » iii t f i i t c o n t a i n
* Format only to p Oh bDHom ra n k rd n l u t i
- Format only v i l u t ) t t U t * r * lb № ( t ( Ш о т * n t n g r
*- Uf ( * 1erm ul* TO d t t i m m e w hich { till 10 to u n it
i d il t h t P u l e U o i i i p h g n
Form*! *11 ed it b * t r t on rntii » iiu n
lion^tylf.
° P / rfoiVft arro<w< Л
0
Icon Ittl
1°od ican
•0ІГ * П ihowjeonОпцг
♦ ♦ Лф-s-nя--»*■■■+
VA
**♦
67
ICOD
“r t a
FttTtf«KonOid*f 9 ° ° d і& п_& t Z t ^ n Z L L
^ Prmttd /*\ b/\#
In*
h
о
ypy
W
D
f^)
ООО
♦A#
*
+■
P frc c n t
t
P fft* n t
Caned
OK
7.
Click the drop-down box for Type and select ‘Number’
8.
For the 'V alues’ section enter:
1. 0.000001 for 'w hen value is’
2. 0 for 'w hen < 0.000001 and’
9.
Click the 'OK ’ button
Edit fie Rule Description:
Fnirrv.jt «11crib bm*d on, Vhrii vjlyw:
i№ ;
ijonStylf
[Can 4*ti
v
ф, ■. ф
v
Q
l(Ort Only
-
tvntn value is
г' ж ^
5.WCW1
±
t
%
>
sH
* 4.
ІУР* V
Numbtr
v
w*tn <O.OWOOl *nd
** v
d
t
Nunbti
*■
wfien 1 1
Diipliy*«<hi(ffn4tt*rdinolothcit™ic:^,^a ^ £
)/.&L- -i,,.^
kon
Value
4
Change Type to
fNumber'
R«nt» Icon О ф (
|
1
10. Save your Dashboard file
We now have performance symbols added to our Dashboard
Cincfl
v
v
Due to page size limitations, the image o f the entire Dashboard is not displayed:
We’ve now enhanced our Dashboard by using slicers and performance symbols.
To learn about refreshing Pivot Table data see chapter 9 and to protect your Dashboard, please
see chapter 10.
CHAPTER 9
Refreshing Pivot Table and Dashboard Data
Once you have created a Pivot Table or Dashboard where the layout and format is to your liking
and you receive new data, this new information may be added to your existing Pivot Table(s) by
using the R efresh feature. By refreshing your data, you may keep your current formatting and
calculations. Just remember in your initial design to allow for additional rows and columns that
may be created when you’re incorporating new data. Let’s walk through an example.
1.
Open the Dashboard spreadsheet you created in chapter 7
2.
Click on any cell inside your first Pivot Table
3.
From the PivotTable Tools Ribbon select the tab Analyze
4.
Under ‘PivotTable Name’ click the ‘Options’ drop-down box and select ‘Options’
FfrC'TiDk Tool!
у
шa с ■ г- =
F|l#
PWtflTnble
Н опгк
Іп к г і
PrjMf
C'K№ L a y w l
Fem wles
Dwgn
O att
Асіяге F
ОыАЧІТГ*
RUrtUNb
1
о т в е т 1E 3
|□
C priii *1
■
Last
■
Rjtfl
Н Ж Я
a«»j
г.ті1
2M l
i rod !
WMt
b i t t i К
TOTAL
1 ^ 7
ч
IDTJUl
1
a m i
ЗЙ 1
Г
З
M 46
И Н
HHLKTUHAL
Ѵ
Ш
Br94fl
-^ T F T T lI
Ы 2І
5.
The following dialogue box will appear, select the ‘Layout & Form at’ tab
6.
Verify the check box 'Preserve cell formatting on update’ is selected
7.
Click the 'OK’ button
Optionally, y o u may also click the ch eck box ‘A utofit column widths on u pdate’. I c h o se not to, I manually a d ju s te d the
columns to be the same width fo r each month. This is simply a design preferen ce to g iv e the D a sh b o a r d a more uniform
look.
8.
R epeat steps #4 - #7 for each Pivot Table you’ve created
Verify your data source is correct
9.
Select a cell in each PivotTable, from the PivotTable Tools Ribbon select the tab
Analyze
10. Click the drop-down box ‘Change D ata Source’ and select ‘Change D ata S o u r c e .’
Das л board Data .-.Is* - Excel
Stiff!
Movf
-
PfvoiTeble
&5eta-!
11. The following dialogue box will appear, verify the Table/Range is correct. In this case,
since w e’ll be appending the data, selecting entire column is appropriate.
Note: you will not receive an error message if the Range is incorrect, however, the new data
WILL NOT APPEAR in your Pivot Table / Dashboard.
12. Click the ‘OK’ button
Next, we will add new data to the Dashboard
13. Click the ‘D ata’ tab
14. Select and copy cells ‘H2:M649’ by pressing (CTRL+C) on your keyboard or:
о From the Ribbon select the ‘H O M E’ tab
Click the ‘Copy’ icon_______________________________________
15. Place your cursor in cell ‘A3242’ and press (CTRL+V) on your keyboard or:
о From the Ribbon select the ‘H O M E’ tab
о Click the ‘P aste’ button
16. Return to the ‘Dashboard’ tab and click on any cell inside your first Pivot Table
17. From the PivotTable Tools Ribbon select the tab Analyze
18. Click the drop-down box ‘R efresh’ and select ‘R efresh All’
R efresh vs. R efresh All
Selecting the ‘R efresh’ option would only update the active Pivot Table, by selecting ‘R efresh
All’ w e’re updating all of the Pivot Tables in the Dashboard.
We now have new data added to the Dashboard
(blank]
C k l- z a i7
TTL
v -
697
2 ,1 3 0
N m i-2017
* /-
ТП
D rc-2017
+ І-
m
+ /-
1,081
1 ,2 3 6 ф
1 9 .9 »
X. 0 3 7
1 .2 7 2 t
22.7%
-24.7%
959
1 .2 5 2
4
25.3%
-27,0%
3 .1 1 7
3 .3 2 0
71&
714 *
ТП
--------------------- 1
22.6%
19. To address the (blank) column in our display, click on the drop-down box for ‘MONTHYR’ and select ‘More Sort Options...
20. The following prompt will be displayed, select the ‘Ascending (A to Z) by:’ radio
button. From the drop-down box select ‘EOM_DATE’
21. Click the 'O K’ button
O ur c o m p le te d D a sh b o a r d :
Due to page size limitations, the image o f the entire Dashboard is not displayed:
CHAPTER 10
Protecting Your Dashboard
Depending on your audience, you may want to consider protecting your Dashboard to prevent
unauthorized users from modifying it. As well as, hide any data source tabs, allowing your
customers to see only the Dashboard itself.
PLEASE NOTE!
Protecting disables the use of slicers and prevents
users from manually refreshing the data.
Hiding Your Pivot Table Source Data
1.
Open the Dashboard spreadsheet you created in chapter 7
2.
To hide the ‘PieC hart’ & ‘D ata’ tabs, right click over the tabs and select ‘Hide’ from
the pop-up menu
3.
To unhide right click over any tab and select ‘Unhide’ (the unhide option will become
active once a tab is hidden)
6
D
F
IW inchester, Chafes FUEL
I W l 5-0.V,
31 O ctober 2017
9
• 3212 Wes!
IWi'ftchester, Charles FUEL
Digieail Fuel Flow Sysiem
11 O ctcO w 2017
7
із г и w « e
jw m c h e s te r, Charls* f u a
*M*I Q uantity tntficatgr
11 O c to b e r» * ?
1
'3214 W est
jttftnchester, Charles fuel
Fuel Flow indicating
31 O ctober 2017
4
S3213 West
iw nw fteste r, Charles fuel
Fuel Pressure indicating
31 O ctober 2017
1
! 3216 w e s t
jw i t e s t e r , Charles FUEl
F i« l Pume
31 O ctober 2017
12
! 3217 w e s t
W HKftester. Charles FUEL
i**ert..
31 O ctober 2017
12
jm a w « t
W ftn th e tff r. Charles f u e i
l l O c to b e r » ! 7
ІЗ
i 3219* West
jw iric h e s te r, Charles POWER
31 O ctober 2017
3
|3220 West
IW fftchesier, Charles POWER
знг
11 O ctober 2017
4
|37Z1 West
w i richetf er, c h a rie r POWER
jn v e System
U m ti
33 O ctober ?OI7
6
31 O ctober 2017
ID
11 O ctober 20t 7
10
31 O ctober 2017
ID
11 O ctober 2017
2
11 O ctober 2017
4
31 O ctober 2017
В
11 O ctober 2017
8
d
І 3222: West
• У22І W « t
OVf-r'
|3224 w e s t
th e
t-Q rW P lV E
t h i - p Q t? - u p
І3225 W*SI
! 322ft Wext
! 3227 West
t ----------------------------- □
W inchester, C h a rle ^ POWER
І3223 West
Iw m d ie ite r, Charles, P ^ V tR
. O il h i:.
4.
£
A
«3211 Wes?
j
PfcChart
ern
I.» Ч М
ІвФ Cukir
*
ster
Sdett Ail Shetfs
„
_
Data r
№■
From the Ribbon select Review : Protect Workbook
Click, to p r o te c t o r ш
p rotect workbook
Щ
i
Review
Developer
^
bhow/Hi Jc Comment
Я Tell r n c n t u t yoi
;■ ■ |
m
O' Show A ll Comments
Protect
Show Ink
1
The following dialogue box will appear:
S ti« t
Wo^bodk
v
J
Protect Structure Mid Windows
?
X
EAr.nw&id lapiioru:
L
Prrttrt »onp*e*fe<
Ѳ Strurtui*
C*
5.
O p t i o n a l l y , e n t e r a Password o r l e a v e b l a n k
6.
C l i c k th e
Uncn
‘OK ’ b u t t o n
Protecting The Dashboard Or Any Other Worksheet
1.
F r o m t h e R i b b o n s e l e c t Review : P rotect Sheet
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
|
2.
Y o u m a y e n te r a p a s s w o r d o r le a v e b la n k
3.
A g o o d b e s t p r a c t ic e i s to l e a v e th e fir s t t w o c h e c k b o x e s s e le c t e d
4.
(these will allow your
customers to click on cells and scroll, but not change any content):
1.
S e le c t lo c k e d c e lls
2.
S e le c t u n lo c k e d c e lls
C l i c k th e
‘OK’ b u t t o n
If a user tries to modify the sheet, they will receive the following message:
5.
T o unprotect , t h e s h e e t f r o m t h e R i b b o n s e l e c t Review : Unprotect Sheet
CHAPTER 11
Grouping Pivot Table Data
In chapters 3 & 4 we reviewed different summary level types of analysis you can complete with
Pivot Tables, however when you have a lot of detailed individual records such as customer
demographics, sales, or location data.
Sometimes more insight can be gained when you can
cluster this data into categories or ranges. The ‘Grouping’ feature allows you to complete this
type of segmented analysis.
For example, let’s say you received a large amount of detailed customer records and need
to:
1.
2.
Group the number of customers by how much they spent
Include their groups percentage to the overall sales total for each segment
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
CustomerSales.xlsx
Sample data for this chapter, due to space limitations the entire data set is not displayed.
ft
1
CilSTOMFR
! “
ID
\i
444
16
!7
!•
!:
i_ _
$
222 4
m
I5
S
Ё6Й
777
142
153
442
am
116
S5S
’
!
1:
PURCHASED
111
и
а
AMOUNT
147
A
_±
436
Ш
jj
4СІ
999
:
l rS00
*3 3 0
A
------
752
Grouping Records
Create a basic Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
chapter 3 'Summarizing Numbers’:
1.
Open the CustomerSales.xlsx spreadsheet and highlight cells A 1:B 3l|(select cells
2.
From the Ribbon select INSERT : PivotTable
3.
Verify the 'New W orksheet’ radio button is selected
4.
Click the 'O K ’ button
A new tab will be created and the ‘PivotTable Fields’pane should appear on the left side of your
screen.
5.
Click the following fields:
1. AMOUNT PURCHASE (Rows section)
2. CUSTOMER ID twice (Values section)
PivotTable Fields
i
2
U h №eddtoreport-
*
RdwLfebeli - I s u n of ГUSTOMffi ID Sum Ы t LfSTOMf ft (Ш
л $
103
510Б
5106
5
$
106
1110
H ID
6
7
$
136
555
555
2 fглиливID
$
М2
111
E " » W i FURtHHitD
я
9
$
147
111
666
6*6
£
153
Ж
Ш
*44?
10
S
$
177
№
M42
11
11І2
vm
12
$
№
2359
2Ш
n
$
5»
1221
14
$
400
m?
un
m7
15
it.
S
401
гввв
гм »
S
403
m
m*
$
IB $
403
444
444
436
177
777
19
5
442
113
111
20
$
513
2664
2H 4
21
$
657
нов
JIM
22
$
719
1M 7
1837
22
$
752
11»
11»
24
$
796
І99Я
13»
25
?h
$
<
85 7
№
1443
ІЧЧІ
1441
17
Cirteji Pufcfa. hvtamnn h im befow
Ii CelM*rtfl'
T Eihni
|: Vtiuet
I Vlhift
S u m a f CUSTOM ER Ю
s«mыcustomercl2
15*4
rfer . f-i ~ ijt U p lift
Sheet!
6.
Click cell ‘A4’
7.
From the PivotTable Tools Ribbon select the tab Analyze : Group Field
C iiftw w S a ifS jts t - Ernef
Faqe Layout
*
FarmultE
Expand fie ld
Power Prvot
■*
G ro u p S rlfc tH
lTidUngieup
H fW iH t
In iflt
S ic H
T im e b fte
R rfreih C hange Data
*
Sewfее*
Clear
*
F riie i
The following dialogue box will appear:
8.
Verify both the ‘Starting a t:’ and ‘Ending a t:’ check boxes are selected
о ‘Starting a t:’ will default to 100 (this is the lowest value in the dataset)
о ‘Ending a t:’ will default to 1500 (this is the highest value in the dataset)
9.
Enter 100 in the By:’ field (this is the amount between group segments)
10. Click the ‘OK’ button
W e ’v e
now
g r o u p e d c u s to m e r p u r c h a s e a m o u n ts in to s e g m e n t s , w it h e a c h b r a c k e t d if fe r e n t ia l
r e p r e s e n tin g a p p r o x im a te ly 1 0 0 :
H o w e v e r , th is t a b le i s n o t p r o v id in g m e a n in g fu l in fo r m a tio n , b e c a u s e it i s in c o r r e c t ly s u m m in g
‘CUSTOMER ID’, t o f i x t h is :
"Purchase_____
j
|!
i
i
i
i
11.
Г7770
2Ы2
300*339
5106
5325
400*439
77^g
»
I
2442 i
iKCorrectly
5106 I
a 325 ,
fp
26M \
600-699
26W
H08
700-799
721b
3108 !
7215 !
SOD-899
900-999
2997
2997 !
1219
32І9 !
1000-1099
4329
J441
4329 |
1100-1199
1400-1500
999
999 |
Grand Tolal
51615
51615 1
;!
11
11
ii
'!
11
I'
!
i
100-ЮТ
200-29Э
500- 599
:
!
;
1
i
Row LabeK - 5 W of CUSTOMER Ю Sum of CUSTOMER ID2 i
1i
i
i
i
i
:
I
|
t
(
i
!
N
1
i
i
i
i
i
|
In th e P iv o t T a b le F ie ld s lis t , in th e
i
‘VALUES’ s e c t i o n , c l i c k t h e d r o p - d o w n b o x f o r
‘Sum of CUSTOMER ID’
12.
S e le c t th e
3441 |
‘Value Field S ettings...’o p t i o n
Count Function
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
13.
In the ‘Sum m arize value field b y’ list box select ‘C o u n t’
14.
In the ‘C u sto m N a m e :’ field change to ‘N U M B E R O F C U S T O M E R S ’
15.
Click the ‘O K ’ button
Ы и е Field Setting*
SOurc* N u n r
CUSTOMER ID
S utlflflt I t t K
NUMBER OF CUSTDMf R5|
JUIrtmnlLjf Y H u ft By
$HO» v m u tt 41
iu m n u n ir value M d by
Chooie the lype of c*kurаііоп ііг іі ю и w#n/t lo u^e to *ymmanze
dita from the i f lerttd field
SttflL
A
Average
MJX
Min
Product
V
Oft
tlufnb er Format
Cancel
16.
In the P ivotT able F ield s list, in the ‘V A L U E S’ section, click the drop-down box ‘Sum o f C U S T O M E R ID 2 ’
17.
Select the ‘Value F ie ld S ettin g s . . . ’option
Ofag field?
Y
M ove Up
are*? t
F iltm
M o .e to Beginning
Rows
AMOUNT PUftCHAStD •
T
M ove lo Report Filter
ШШ
M ove to Row Label;
»
M ove IP Colum n Lab tlb
X
Remove Field
Ѣ Value F idd Settings
5 u " of c u s t o m e r ю і
18.
In the ‘Sum m arize value field b y’ list select ‘C o u n t’
19.
In the ‘C u sto m N a m e :’ field change to ‘% O F C U S T O M E R S ’
Value Field 5ettrg;
?
*
X
SOurt* Name CUSTOMER ID
iurtfln
SOfCmTOMtnjI
S U M W t» V ilu e i B|f
S h o w V i l u r i As
5ипіпигі;е vmw fleM by
( I H H K l l ' f Typf
(*l(4 H 4 lio n Th*l y flu W in l 14 u i* (o f g m m jr iH
del a from the teleded field
Sum
■Count
Averige
m
A
ШШ
t
Mm
Product
_ ________
.Number form at
20. Click the ‘Sh ow V alues A s ’ tab
V
OR
Cancel
W e now
21.
Click the ‘S how v a lu e s a s ’ drop-down box and select ‘% o f Grand T otal’
22.
C l i c k th e
23.
C h a n g e t h e t e x t i n c e l l ' A3 ’ f o r m “ R o w L a b e l s ” t o ' AMOUNT PURCHASED ’
‘OK’ b u t t o n
h a v e a r e p o r t th a t g r o u p s th e n u m b e r o f c u s t o m e r s b y h o w
m u c h t h e y s p e n t a n d th e
s e g m e n t ’s p e r c e n t a g e t o t h e o v e r a l l s a l e s t o t a l .
3
AMOUNT
NUMBER OF
% OF
PURCHASED -
CUSTOMERS
CUSTOMERS
4
100-199
7
23.33%
5
200-299
1
3.33%
6
300-399
3
10,00%
7
400-499
6
20.00%
8
500-599
1
3.33%
9
600-699
1
3.33%
10
700-799
3
10.00%
11
SOO-B99
2
6.67%
12
900-999
1
3.33%
13
1000-1099
2
6,67%
14
1100-1199
2
6.67%
15
1400-1500
1
3.33%
16
Grand Total
І0
100.00%
CHAPTER 12
Calculated Fields In Pivot Tables
As demonstrated in previous chapters, Pivot Tables have many powerful analysis features already
built-in, however the type of work you perform may require more complex or technical types of
calculations than those included in the standard set of Pivot Table 'Value Field Settings.’ This is
when the ability to insert your own ‘Calculated Fields’ is particularly helpful.
For example, let’s say you’re responsible for analyzing your company’s sales location plan
vs. actual. In addition to this you also determine if a store is eligible for a bonus and if_they
earned a bonus what the bonus amount is to be paid.
You perform this type of analysis on a regular basis and it is the type of business, where
some stores may close and others open from month-to-month. You need to report:
1. The monthly sales dollar variance -/+ plan vs. actual by location
2. The monthly percent variance -/+ plan vs. actual by location
3. If the store is eligible for a bonus, based on actual sales greater than 1.5% over planned
sales
4. If the store earned a bonus, the dollar amount owed to each location, which is 2% of that
store’s actual sales
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
StoresSales.xlsx
Sample data for this chapter:
J
e
о
l Location M o n t h P a n n e d sjIos Actual Sa les
2 ДДЛ
Jan
406
414
Jan
г RHB
332
32$
ДЛЛ
A pr
432
4501
sea
A pr
33S
329
52fi
ccc
Jan
496
526
ccc
A pr
509
5 ODD
Jan
136
DOD
A pr
6 EEE
152
155
150
Jan
178
171
tff
A pr
191
170
7 AAA
Feb
415
«7
GGG
A pr
І31
I 701
В
Feb
M6
143
9 Ic c c
Feb
Ы?1
W5
110 DDD
Feb
175
184
111 IEEE
12 ДЛЛ
Feb
173
ШЗ
424
4X6
BHB
Mar
360
363
44 | c c c
Mar
612
648
115 DDD
Mar
202
207
lie EEE
Mar
163
Ш
4
!
;ia
Mar
Adding A Basic Calculated Field
Create a basic Pivot Table report, to see screenshot illustrations of steps #1 - #4, please see
c h a p te r 3 'S u m m a r iz in g N u m b e r s ’ :
1.
Open the StoreSales.xlsx spreadsheet and highlight columns A :D
2.
From the Ribbon select IN SE R T : P ivotT able
3.
Select the ' N e w W o r k s h e e t ’ radio button
4.
Click the ' O K ’ button
C f c d t g P i v o t T a b le
Clioo se the data
du w a « t t o anafrze
Sefee* ы
д
<*i ie l e f l в 1йЫ * н fa n a *
^
О USf ®п if tf ГПІІ diTl IDUfft
Січвем C m w h m
Cenn*<Ti&n f t * iw
Ui t tN l WrfMtbOOi I Dri >
C h o o if w h m you * * n i t h f Ргто4 ГйЫ *
1o b* placed
!■*■ [je w W orksheet
О £wftlf*5 Weftshcct
^DU&OK
C h o a » w h e th e r y w w i i f l t o analyze я ц й ір іг t i h k i
Q
A dd th H data to th e Data SJotfet
Cancel
OK
A new tab will be created and the ‘PivotTable F ie ld s ’p a n e should appear on the left side of your screen.
5. Select the following fields:
1. Location (Columns section)
2. Month (Rows section)
3.
Please note: when adding the QTY
fields, it will default to ‘Count o f Q TY’, change to ‘S u m ’
Planned Sales and Actual Sales (Values section) )
d ra g this field to the rows section
4.
L
2
3 1
......
5 Jan
0 Sum erf P lanned S a l«
7 Sum e l A c iu J f
У
t
& " і Т Т Т '" Г """’h.... FT'
P iv o tT d b le
4 ЙСіи>ЫЫ>І(
a
*
£
k o ln in n
Ubeh 1
"a a a
а» Й2 аэб 35Z 1Я
414 № SJfi 156 |75
Sum erf P lanned S a l«
ац ІЛЦ M l Ш 173
m S№ 3i« m
417
<5cirth__________________________________ JO]
l!*a
1SW
Й
412
Ш
SCB
17M
m
m
Ш
«7 Ш
1W
33 Sum Ы Pla nned 5 л І«
1* S ym erf A t iw il
17 T o u l Sum йГ Р У іігн Ч І S jlf-l
tie
m w ЗйЭТ -.JO 510
WM
:a T r ia l Sum o l A ctual Sales
1ZS7 10W
1?Cr9 M 7 519
sue
-
fh*g Frtrit h*(viPi?n ■ifx г#-ѵі*
T Fihin
Г- Column
19
PirtrV
J- VlbrtS
39
11
Uonrii
Sum al H in m
L _ Г. Ѵііля
~ J Sum al A rlu il 'й к і
24
(b la n k}
.21
6.
Change the text in cell ‘A 4 ’ to ' M O N T H ’
7.
Change the text in cell ‘B 3 ’ to ' L O C A T IO N ’
8.
For ‘Sum o f P la n n ed S a le s ’ under ‘Value F ield S ettin gs ’
о Change the name to ' P L N S L S’
о The ‘N u m b er F orm at’ to a currency of your choice
For ‘Sum o f A ctu a l S a le s ’ under ‘Value F ield S ettin gs ’
о Change the name to ' A C T S L S’
о The ‘N u m b er F orm at’ to a currency of your choice
9.
i*
[Si J k lu d S id c ,
1731
HO
L-M-ir-w.
|=H Hknth
P i FImiiic J &*4съ
im o
aw
X
& »:
ГЬппг Гнгііс tr add In rvport
ПВ* ccc ODD FFF ( Ы л * ) G raM I T r ia l
Feb
№ Syrtl C-1Л £ !и *іІОД*
U Attar
12 Sum Ы P lanned S a lw
13 Sum erf A tiw H f r l e s
*
F ie ld s
T h e P iv o t T a b le s h o u ld l o o k s i m i l a r to th e f o llo w in g :
LOCATION
MONTH Г.
Jan
PLNSLS
ACTSLS
AAA
BBR
CCC
ODD
$406
$414
$332
$329
$496 $152 $178
$526 $156 $173
$1,564
$415
$427
$346
$342
$551 $175 $173
$595 $184 $183
$1,660
$1,731
$424
$360
$612 $202 $168
$363
S64S $207 $163 ч_____ ,>
$1,766
$1,797
1
1
!
!
Ш
(fblank) Grand Total
$1,598
Feb
PLNSLS
ACTSLS
Mar
PLNSLS
ACTSLS
$416
ftblank)
J PLN SLS
l :j .
..
,
(W ***)
f is i a s in a la t& r s t e p
j
{ ACTSLS
Total PIN SLS
Total ACTSLS
$1,24S $1,038 $t,6S9 $S29 $519
$1,257 $1,034 $1,769 $S47 $S19
)
$4,940
$S,126
T o a d d o u r f ir s t c a lc u la t e d f i e l d s h o w i n g th e s a l e s d o lla r v a r ia n c e - / + p la n v s . a c tu a l.
10.
F r o m t h e PivotTable Tools R i b b o n s e l e c t t h e t a b Analyze
11.
C lic k th e
12.
S e l e c t ‘Calculated F ield...’
‘Fields, Items & Sets’ d r o p - d o w n b o x
с Tools
|
A n a ly z e
| IjgL
11
v и .■■11 1 л :. i
jll
StareSiaJesjdsx - Eicd
0 Tdl m e wriiM you w in! to do
D e s ig n
Щ Щ Щ
С leaf
*
.
S d ftt
Move
*
РіѵокТаЫе
ACtlflfH
i
i
!
!_
1 fe]
PivotChal
C*ku o t« d | -.1
Jclf* Odder -
0
H
A
Ш
F i e ld i , D m t ,
[ід
!
;
Fo im u lii
1
i
Crejte Set E i 't c o n in lu m r Items-..
1
i
The following dialogue box will appear:___________________________
Insert Calculated field
Msmc
ЯеМ'Й
Гощ иіа:
- 0
Eleldi;
flo ta tio n
Month
Planned S ilti
a dual Sifei
?
X
«]
fie le te
H
in e r t Field
On
G o le
13.
In the N am e: field enter ‘D ollars -/+ plan v s actu al’
14.
In the Form ula: field delete the zero ‘0 ’, but leave the equal ‘= ’ sign
15.
Select 'A ctual S a les' from the ‘F ie ld s ’ list and click the ‘In se r t F ie ld ’ button
16. Add the minus ‘- ’ symbol in the Form ula: field after 'A ctual S a le s ’
17.
Select 'P lanned S a les' from the ‘F ie ld s ’ list and click the ‘In se r t F ie ld ’ button
The following formula should now be in the ‘F orm ula:’ field
= 'A C T U A L SA LES' - P L A N SA LES'
18.
C lic k th e ‘ O K ’ b u tto n
T h e f o l l o w i n g f i e l d w a s a d d e d to o u r P iv o t T a b le r e s u lts :
N e x t, w e ’l l a d d th e c a lc u la t e d f i e l d fo r th e p e r c e n t v a r ia n c e - / + p la n v s . a c tu a l
19.
R ep ea t ste p s# 10 -
1 2 fro m a b o v e
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
1
Insert Calculated F itld
Nam e;
F*ddi[
F o rm u la :
*
?
1 ^ 1
X
i* ic i
0
Fie ld s;
*
Ell L o c a tio n
fie ld
M o n th
P la n n e d S iK s
f iC s t I 1
[ D o lla r s - -
i
_ p la n «
a c tu a l J
■
Im e ri
' *
«
*
*
Field
OK
Close
20.
I n t h e Name: f i e l d e n t e r
‘Percent -/+ plan vs actual ’
21.
I n t h e Formula: f i e l d d e l e t e t h e z e r o 'O ’ , b u t l e a v e t h e e q u a l ' = ’ s i g n
22.
A d d t h e b e l o w f o r m u l a t o t h e Formula: f i e l d
=('Actual Sales'-'Planned Sales')/ 'Planned Sales'
23.
C l i c k th e
‘OK’ b u t t o n
T h e f o l l o w i n g f i e l d w a s a d d e d to o u r P iv o t T a b le r e s u lts :
L e t ’s n o w f o r m a t o u r r e p o r t t o i m p r o v e r e a d a b i l i t y
‘VALUES’ s e c t i o n , c l i c k t h e d r o p - d o w n b o x f o r
‘Sum of Dollars -/+ plan vs actual’
1.
In th e P iv o t T a b le F ie ld s lis t , in th e
2.
S e le c t th e
‘Value Field S e ttin g s . ’
3.
C h a n g e t h e ‘ Custom Nam e:’ t o
‘$ -/+ PLN vs. ACT’
4.
C lic k th e
5.
In th e P iv o t T a b le F ie ld s lis t , in th e
6.
S e le c t th e
7.
C h a n g e t h e ‘ Custom N am e:’ t o
8.
C lic k th e
‘OK’ b u t t o n
‘VALUES’ s e c t i o n , c l i c k t h e d r o p - d o w n b o x f o r
‘Sum of Percent -/+ plan vs actual’
p la c e
‘Value Field S e ttin g s . ’
‘% -/+ PLN vs. ACT’
‘Number Form at’ t o c h a n g e t h e f o r m a t t o a p e r c e n t a g e w i t h 1 d e c i m a l
‘OK’ b u t t o n f o r e a c h d i a l o g u e b o x
9.
C lic k th e
10.
C lic k th e d r o p - d o w n b o x fo r
‘M ONTH’ a n d s e l e c t ‘Label Filters’ t h e n ‘Does Not
E q u a l.’
11.
W h e n p r o m p t e d e n t e r (blank) , this method will ensure when we refresh the data, the
blank rows & columns will not appear, but our new locations will.
12. From the PivotTable Tools Ribbon select the tab Design
13. Select ‘PivotTable Style’ of your choice
14. Click the checkbox ‘Banded Columns’
I L-'jbiulj Il bifc'rfJ
Report
Stank
і|^Н|Тр4|Ц- ЦоЫ- Іви- '
{
lifm
/+ Р *ІП
v\ M t u il
f■
r ti n n r
i
"
fti irt.4 iy«‘ijii I I
В
Am
FtNlll
actus
$ >/■p i i f l v | « 1 u£l
RP- f a M
Г ц Ы ц ^і
с
УО0
я і*
ш
ллл
0
(
f
Б
ccc
on
in
m
UM ііг» S IJ * i
ьш
яг*
О*ч
(МАМК0
fc» sis* ЯП Я.ИІ
$H
po a
Ш
jjflb
j J4
f«fe
S4IS
PLN &L&
ACT SLV
S /■ р і і л V i ЙСІІШЯ
% -/ * iptaii ѵь «etual
Ш*
PLN SLS
ACTSLS
$ы*
№
ЯП я и K M
sm Stu Ш1 SLTH
{*4
Si
* 0% y i%
■1 №.
ЯМ
$ *U
SJdi
SfiJJ Sam $111 Я . » *
&ЫІ 530? І Ш Я,7»Т
Яі
г
1_9Ч
0L*V
1 A 2Jfc 1 Л
Е_ГЧ
ян
tm
5Jtc-
5KtltfJ
% /+ pijan и aciuil
Яа
SA
т
2.1%
fa
Яі
»
571
*
rt
Now let’s examine how our results change when we add or remove locations.
1.
Return to the ‘StoreSales’ tab
2.
Copy cells ‘F2:I7’ and paste into in cell ‘A17’
1
A
B
С
D
E
F
G
H
I
1 Location Month Ptanoed Sales Actual Sales
!
2 АЛА
Jan
406
414
[AAA
Apr
432
450'
3 8 вВ
Jan
332
329
■BBS
Apr
338
3291
4
ccc
Jan
496
526
Jccc
Apr
509
52ЙІ
5
DDD
Jan
152
156
Id d d
Apr
155
150!
& EEC
Jan
178
173
I fff
Apr
191
170!
7 AAA
Feb
415
427
[GGG
Apr
170[
8 BBB
Feb
346
342
131
1
9 ccc
Feb
551
595
10 DDD
Feb
175
184
И EEE
12 AAA
Feb
173
1ЁЗ
маг
424
416
13 BBB
Mar
360
363
14 CCC
Mar
612
643
15 DDD
Mar
202
207
p a s t' *
4
tt
/
168 .............- i s 3
Mar
16 ЕЁЕ
л р г-— r -----AAA*—
17
432
IS ВBE
Apr
338
329
CCC
Apr
509
526
20 DDD
Apr
155
150
! 21 FFF
i 22 GGG
Apr
191
170
Apr
131
170
19
CoP y cett$ 'FL - t
450
i
3.
R e t u r n t o t h e Pivot Tables t a b , f r o m t h e PivotTable Tools R i b b o n s e l e c t t h e t a b Analyze
4.
C lic k
‘R efresh : R efresh All’
Changing The Display Of Formula Error Messages
A r e p o r t s im ila r to th e f o l l o w i n g s h o u ld n o w a p p e a r :
5.
T o r e m o v e th e # D I V /0 ! d is p la y , s e l e c t th e
Home
PivotTable N a m e
‘Options’ d r o p - d o w n b o x , t h e n ‘ Options’
Insert
Active Field:
PivotTablel
О Field Settings
6.
U n d e r th e
‘Layout & Form at’ t a b , c h e c k t h e b o x ‘For erro r values show:’
7.
C l i c k th e
‘OK’ b u t t o n
PrvotTa Ые Optio ns
PivotTab le йэгп-е:
Layout & Forn-.at
X
?
PtvotTab le i
Totals & F ilters
D isplay
P rin tin g
Data
A ttT ejd
Itroul
t e n i t i tens w it h и ь е і г
W h e n In to m p a c t fO m H n d e n t r o w t a t x l }
Ц і* р Іа у f u l d s In г г р о Г T iltr f l i f t '
Rep on f iHer 11eid s p er сoiumn.
1
Z (tiara cter(s)
D o w n T h p rt O v ( f
0
Z
For m et
0 ForЛ"ог «'Ц*? sbow
0
For tmpty «M i irtow:
0
Autofrt colum n w i d t h i o n u p d a t e
0 £reierve re II rormatling on update
OH
c jn te i
Removing Or Changing Calculated Fields
T o r e m o v e o r c h a n g e a c a lc u la te d fie ld :
1.
F r o m t h e PivotTable Tools R i b b o n s e l e c t t h e t a b Analyze
2.
C l i c k th e
3.
S e l e c t ‘Calculated F i e l d . ’
‘Fields, Items & Sets’ d r o p - d o w n b o x
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
4.
In th e
‘Nam e:’ d r o p - d o w n b o x s e l e c t t h e c a l c u l a t e d f i e l d y o u w o u l d l i k e t o c h a n g e o r
rem ove
5.
C l i c k a p p r o p r ia te b u tto n , e ith e r
‘Modify’ o r ‘D elete’
Inserting Logic Fields (if...then)
We’ll need to add two additional calculated fields, in order to answer the following questions:
•
Is the store eligible for a bonus based on actual sales greater than 1.5% over planned
sales?
•
If the store earned a bonus, what is the dollar amount owed to that location? This is
calculated as 2% o f that store’s actual sales.
The two calculated fields needed:
1. Location Eligibility Amount to calculate what is 1.5% over the planned sales for each
location?
2. Bonus Award the dollar amount owed, if they earned the bonus, what is 2% of actual
sales for that location?
Location_EHgibility_Amt formula:
='Planned Saies'+('PIanned Sales'*0.015)_____
Bonus_Award formula:
=IF('A ctuaI Sales '> L ocation _E ligibility_A m t,('A ctu aI Sales '* 0 .0 2 ),0 )
к « ■ р
if
a'a U ?
I
1
II
I
I
І:і
1 ■
lb
йь
,
liiHl'J : ! *
I4*! hi !ti LV LV IV G Ь I
**55*
3a
aдA * І И 8
I y sE5 і5£$а
a
3R'-Я
I BA ft it а s я 3)4
*sM
*я
я
S23S*
6£*f*| 5э«5*
t
j
j
І
j
35*S5 aa Д ***** 1**5*
IPS» **Ha І1И» 8S»5a
~*P5*; *1*1* SI'S* "Ш5*
t!aS* 23s!* 5l:i?s Ш5‘
я
|]s
Hi
E*i!1
■И H
Ш
£
i
*
aaf^s aabs аа*}| 3' 3S4i Iv?Sa « ^ * £
.^M
VО11111
I” ***! fSSil ^C
CHAPTER 13
Creating Pivot Tables From Imported Files - using the Data M odel
Like with many tasks in Excel®, file importing and parsing can be accomplished in multiple
ways. The following example describes how to read and parse a.CSV (comma separated value)
file using Excel’s® Data Model technique. Then applying the parsed data to create a Pivot Table
report.
The Excel® Data Model is a feature in which different data sources can be brought together
into a single workbook. Once this information is in the workbook, you’re able to create more
robust Pivot Tables, Pivot Charts, or Power View reports.
This type of reporting can also be achieved by using macros (Visual Basic for Applications)
or Power Pivot. Deciding which method to use depends a on variety of factors, such as:
•
The amount of data your analyzing
•
The complexity and time it takes to complete your analysis
•
Your audience’s requirements
•
Your experience with Excel®
In the following example, the reporting is straightforward, w e’ll be reporting on less than 100
records. Our Excel® Data Model will contain only one data source.
In this example, you’re a Business Analyst and a request has been made to change a monthly
employee sales report. Management would now like to see:
1. A regional summary
2. Employee sales grouped and subtotaled by region
Employee sales are captured in a legacy system. This older system produces a monthly .CSV file
and saves it to a company server location. To save time formatting the same report each month
you create Pivot Tables to parse the .CSV file and format the data into a Excel® report.
WEB ADDRESS & FILE NAMES FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
EmployeeSales.csv
ADDITIONAL STEP FOR THIS
CHAPTER
Save the EmployeeSales.csv file to a location on your
computer you can easily access such as a temporary
folder or your desktop.
EXAMPLE:
From:
!
HOME
! ІЙ 8
!
A
-J Efa Paste
-it
,
I
in s e r t
I ^
page la y o u t
j
^
rev^
data
^Cond<tk>nal Form atting'1 I g j;
:^ Е о п т н і asTabJe -
Eom
,
Alhqnnveni Number
.
.
Cells
[§fCeli Slytes *
.
1
|Fj
'■
]
Ft1
I
P27
13
A
*
В
С
f*
0
:
■;
SALES
|
E
1
REGION
SALES.PEE SALES PER SALES.PEf MONTH
2
West
Jack
Smith
105 M arch
4Ш
3
West
Jo*
Tanner
119 M arch
4520
4
West
Peter
Graham
130 M arch
4456
!
W illiam s
179 M arch
3174
!
1
В
West
Abbey
6
Last
Sarah
Taytar
183 M arch
3757
!
7
E dit
John
W ilson
136 M arch
3079
!
e
East
M ary
Nelson
106 M arch
3117
|
9
East
John
Dower
135 M arch
3871
|
10 South
Jeanne
Campbell
114 M arch
47B5
;
11 South
Sheldon
Bates
137 M arch
3834
;
12 South
Carson
Lewis
109 M arch
4805
!
_
E m p lo y r t S ile s
To:
fo rm u las
4|
•
|
А
&
С
О
Е
F
Employee & Region Sales Report
EMPLOYEE & REGION
MONTH
REGION
SALES
M in t )
SALES
C tntral
MONTH
'
March
19,054
Central
19,054
Becker
4,647
EasT
13,769
John»n
4,3W
South
?P,979
M orton
3.425
West
16,ЭЙ/
Smith
1.3710
TOTAL
70,699
Taylor
C ut
W b
11,769
Dower
3fi71
N d to n
3,117
Taylor
3.752
W ilw n
South
3,039
20,979
Bate»
3,834
Slatehford
4,350
Camptx-ll
4,2B5
Lewb
4,aos
Tansae
West
3,705
i6 ,a s?
Graham
4,456
Smith
4,7&7
Tanner
4.520
Williams
TOTAL
3,124
70,W 9
1.
C r e a t e a n e w b l a n k E x c e l ® s p r e a d s h e e t (CTRL + N)
2.
R enam e
3.
S e le c t c e ll
‘A l’ a n d e n t e r t h e t e x t ‘Employee & Region Sales R eport’
4.
S e le c t c e ll
‘A3’
5.
F r o m t h e R i b b o n s e l e c t INSERT : PivotTable
‘S h e e tl’ t o ‘Monthly Sales R eport’
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
6.
S e le c t th e
‘Use an external data source’ r a d i o b u t t o n
7.
C l i c k th e
‘Add this data to the D ata M odel’ c h e c k b o x
X
Create PivotTable
C hooie th e d *t j that you warn to analyze
О Select a table Df range
Table/Range:
Uft wi erttmai дміннян
Chgcse Connection...
Connection name
utt thn worKtiook'i oatj Model
Choose where you w ant th e PrvotTable report to be placed
О
W o rtiih te t
® putting Worksheet
^ o c iti о it
M onth ry Salei Rep ort S^S 3
Choose whether you w ant to analyze m ultiple tables
0
Add t h li data to the Date Model
OK
Cancel
_A
8.
C l i c k th e
‘Choose C o n n e c tio n .’ b u t t o n
Choose the data that you want to analyze
С ) Select a table or range
TaOle.Harge
Use an external daia source
Choose Connection..
Connection name
Use this w o r k b o o k %D i i j M odel
C hoose w h e re y o u w i n * th e P urotT ible re p o rt t o be placed
O JJew Wo rtshe el
(•) £*itim& w orksheet
Location:
I
Monthly Sales Report \AS;
Choose whether you want to analyze multipie tables
И Add this data to toe Data Model
ok
A prompt similar to the following should appear:
Cancel
Existing Connections
7
X
Select•ConnectionorTable
^omnecSions rabies
Show :
f f t jj C g n n e r t i o m
______________ _ J
v
Connections in this Workbook
< N o с о л п к і к т found ►
Connection files on the Network
-N o сеппесіімн round*
Connection fifes on this computer
- N o c o n n - r c tic m * f o u n d 31
B ifrw se Tat M fir*...
Q p"
C ancel
‘Browse for M ore. . b u t t o n
9.
C l i c k th e
10.
W h e n p r o m p t e d s e l e c t t h e f i l e p a t h w h e r e t h e f i l e ' EmployeeSales.csv’ i s l o c a t e d
11.
C lic k th e
‘O pen’ b u t t o n
T h e f o l l o w i n g Text Import W izard w i l l b e d i s p l a y e d :
X
I ?B(t 'n 'p o r t Wizard - b ttp 1 o l i
I
' T * f Т>яІ A l u f d h ± i d f l r - n - 1 - . t : ■■
If Itli-J. h!
■
■ . i± r ± i. C - ' - : * ■
cti^e ie N fH , t>г A M H t Iftc J i t * 1>i*4 m j Ь г ^ af Tf r iB f' ГОЧГ
O r ig in a l d .itn t y p f
Choose the TH* № ( tbil Cru flu crDt i your d j:j
• ^ f l lm i tr d
- C h u p r l t i i t u t h I I t o t i t n i i <ftI t t t і г м и і г c » (h fifld
О
n t l d i > rr j n g n t d i n ( о і . г . ц м г и і р к к S i t i m n f » t n f i K d
Ы н ) щ іЛ Ь
I S tirl Im port f t |Ort"
j
Г I. .In 1 T H i . I . ^ i
1
K ( jiig n
i ) 7 ' D tM U n 4 id Н И »
-I
I
I ft tvinv or ГіIt I Uitr s ih m m i If>o cum* rtv M iirC h n s' l e e l Lt(H Fcimul*..Enetoyvt&alci.civ.
1
а к т е * , s a l« я _ г іг к ж _ п b57_naxe. j t u i
i fea t j J a c k , Ebli i.h r 1 j £ , M xr cr. r 47 ST
я ; і ;и l a s t
я a k s , s a l e , : - _ ; i s ? н _ [ d , mon
Тммг, 21$, JUres, #a?o
ИеяЪаFebei, 3ra h ыг,, 130,Ні»гсЬш44&€
£ < * i t , А Ь н у , Ha 1 1 a ш
. I '1S . M a r c h , 1 1 2 4.
*
Oned
Mert
finish
12.
S e le c t th e
‘Delimited’ r a d i o b u t t o n a n d ‘My data has headers’ c h e c k b o x
13.
C l i c k th e
‘Next>’ b u t t o n
S t e p 2 o f t h e Text Import W izard w i l l b e d i s p l a y e d :
14.
F o r th e D e lim it e r s , s e l e c t th e
15.
C l i c k th e
‘Finish’ b u t t o n
T h e fo llo w in g p rom p t w ill ap p ear:
‘Comma’ c h e c k b o x
Create PivotTable
?
X
Choose the data that you w art to analyze
С Select a table or range
Table/Range: '
±
(•; Use an external data source
Choose Connection,.,
Connection name; EmployeeSales
Use this wOfkbOOk'5 Data Model
Choose where you want the PkotTabie report to be placid
С New Worksheet
Existing Worksheet
Location;
±
'Monthly Sales Report'lSA£3
Choose whether you want to anafyze multiple tables
0
Add this data to the Data Model
OK
16.
Cancel
Click the ‘OK’ button
A prompt similar to the following should appear (it may take m om ent to load) :
17. In the ‘PivotTable Fields’pane select the following fields:
о
REGION & SALES PERSO N LAST NAM E (Rows section)
°
о
MONTH (Columns section)
SALES (Values section)
T E m ployee & R e g io n S ales R e p o i
2
3 SunIuf SALES Lulurnn Lj(M:h jGrai>J TDfel 1
* Raw EabiL - МлісЬ
s - Centiel
ISW
ISft*
itJ7
Bec*»r
Щ7
с
ІЖ
i; «
7
I
Merten
14»
14»
$mdh
5
3JTu
jjid
“tuylot
JZ№
to
згл
t1 [« t
ія н
11ГЙ
■■■
Down
№1
№1
■
N*lum
JUT
HIT
ТцНоіJTW
N
jtu
w iw
1i
3d»
30»
If! Sftflh
m»
If
Bm i
ЭД4
)SM
Ш
'i,
QiiliMon)
i.ISO
Cimpbell
1<3
mi
20
LtM
t№
4№
Л
Tutu
1W
іи ;
4? Wm
1WF
:
Onhvn
«56
«»
2.1
Smith
*7fl7
Ш7
2І
Таяпи
*S20
*520
24
Willixnt
3124
312*
ГОЙ»
JOHB
?J (*inn<L 1ptnl
а
24
L™
18. Place your cursor in cell ‘E3’
nfttfl *ddIs
M i l 1 П JtHM t AS f МАЫІ
jum.msoNjc
Ш
ЖІ>І
МШ
ІН
і*эоч
—
-
3- ѵ|1ц>*1
ЬиплГ54LES
-
19. Repeat steps 5 - 8 from above
A prompt similar to the following should appear:
20. Select ‘EmployeeSales’ and click the ‘O pen’ button
21. Click the ‘OK’ button
Creat* PivotTable
X
?
C hoose th e d ata th a t you w an t to analyze
О
Select a table- o r r a n g e
labfe/Range;
±
(•) yse an external data іоике
Choose £onn« 1ion.,
C onnection name
О
E m p lo y e e s * le t
Use this w o r k b o o k i £ a t a M o d e l
Chooie where you wan! the PivotTable report to be placed
О
Worksheet
@ |* i sting Worksheet
Location;
M o n th ly Sale? Report 5ES3
£
C h o o se w h e th e r you v. an t to analyze muttip^e ta b le s
Add this d ata to th e Data M sdel
OK
Cancel
22. In the ‘PivotTable Fields’pane select the following fields:
о
REGION (Rows section)
о
о
MONTH (Columns section)
SALES (Values section)
23. Right-click over both ‘G rand Total’ fields and select ‘Remove G rand Total’
i Employee S Region Sales Report
5ut* о* SALES
4 | How 1abali
Column ІлкчА
M anh
1f №
M T
C w r tfli
6
M
10
11
h ilm iM
Мкпіип
•*№!•
ЫДО
ЬчЙІІ
1аИі-н
11*0
1M *
n m
till
W
11
D tm iii
N d io a
M in
1117
]4
lb
Тв|1си
Wiban
>H J
30M
j+:.
17
c*n,.i . :i
Ъ іК ІШ
&and Ш
lin t
7097*
S outh
Bj Cl'Si
5fiSi
■ & ' * . %
) Свіцщт Ll
On
Н
1ЙИ4
У
im
Щ0Я
ІШ
ІНѴ
№
Wh C
t w
№ w4 Ія г і
Ш Н
J tw rt
Ш *
n m
**7 |
n if
}JW
30»
■WWl
5S34
24. Re-label and format column headings, change currency to your preference
,E m p l o y e e & R e g i o n S a l e s R e p o r t
:
I EMPLOYEE & REGION
M O N Ttt
REGION
M ONTI
'
I
Ih r ii
SUES
M ir th
j
SALES
[
c * n n ,l
S
1» ,M J
C rnlral
$
I
В *ч *гг
$
ifin
Г..-.Г
$ 11,769 I
beufh
5 » ,9 ? 9 i
TOTAL
$ 70,689 I
;
Johnson
i
« ,!№
I
M o rto n
^
J .^ 5
'
5n«h
5
1J70
І
19,054 '
16,037 j
I
Taybi
J
U Jh
I
1
кай
i
1 3 .7 ft
!
D ew ct
№ lie n
S
ЗЯ 71
$
1.1If
i.nj
Гцуіш
W lho*
Sourh
s
I
1Л7Ч
H .»7S
B ntrt
IJIart hiurd
i
1
и л
4 ,3 »
Campbell
s
o k
IfW il
Т ап ы ^
I
■a,405
$
3,345
I f S3 7
W ill
s
Graham
5
M S6
5n*th
Tanner
$
$
*,787
Williams
S
3rU4
£
4 ,8 »
TOTAL
i.in
CHAPTER 14
Troubleshooting: Pivot Tables Displaying Duplicate Values
Sometimes the data w e’re analyzing is not in a format conducive for Pivot Tables. Cell values
may contain extra spaces between and after words. This can cause Pivot Table reports to display
incorrect results, below are two examples of this issue and how to resolve them.
WEB ADDRESS & FILE NAME FO R EXERCISE:
http://bentonexcelbooks.my-free.website/excel-2016
FormulasLenAndTrim.xlsx
Example:
You’ve been given an report that was created by a Data Base Administrator (DBA). The DBA
created the file by running a query in a database, exporting the results into a .CSV file, and then
opened and re-saved the report as an Excel® file.
As the Business Analyst, you’re attempting to reconcile the data using a Pivot Table. In your
analysis, you’ve discovered cell values that “look” to be the same, but are being returned as two
separate records in your results.
You decide to use the LEN function to troubleshoot why you’re getting two separate records
in your results for what appear to be the same value.
Below is an illustration of the Pivot Table report showing the incorrect values.
.
л
Row Labet*
в
!
Sum o ff Hull W E S
A
Apples
100
5
Apples
S00
6
7
Kiwi
Granges
600
600
В
G ra n d T o ta l
1800
9
Formula - LEN
Definition: The LEN formula counts the number characters in a cell
Formula Syntax:
LEN(text)
te x t is required
1.
O p e n th e F o r m u la s L e n A n d T r im .x ls x s p r e a d s h e e t
2.
S e le c t th e ta b n a m e d
3.
S o r t i n g t h e r e s u l t s b y ‘Fruit Name’ i n Ascending order
‘Len’
Г ................T
A
В
FRUIT NAME
t
FRUIT SALES
100
100
loo
200
200
200
300
300
300
A p p les
Xtwi
□ ra n g es
A p p les
KtWl
O ranges
A p p les
Kiwi
O ranges
11
4.
S e le c t c e ll ' C 1 ’ an d la b e l it “L E N F U N C T I O N ”
5.
C lic k c e ll 'C 2 ’
! '' '
1
A
1
1
1
FRUIT NAMF
1
С
FRUIT SALfS
LFN FUNCTION
\2 Apples
100
'
Apples
200
Apples
300
!
Kiwi
100
!r
Kiwi
200
Kiwi
300
|e
Oranges
100
!
Oranges
200
Oranges
300
!
6.
В
F r o m t h e R i b b o n s e l e c t Formulas : Text : LEN
1
1
1
j
1
|
1
1
І
1
1
1
1
1
1
І
!
1
1
1
1
1
1
___ 1
Hom e
fx
Insert
x
tnieft
Draw
id m [в
Auto Sum Recently Financial Logical
Function
-
Used ■
*
*
и i
T«(t
-
FyflctlOl
C2
"И
I >
v'
Formulas
Page Layout
Л
I
Date b .
Lookup 6. Ma
T im s ' Reference- Ti
8AHTTEXT
CHAR
CLEAN
А
в
FRUIT NAME
FRUIT SALES
CODE
LEN FL
1
CONCAT
2
Apples
100
DOLLAR
г
Apples
200
EXACT
A
Apples
300
5
Kiwi
100
6
Kiwi
200
7
Kiwi
300
8
Oranges
100
LEN
9
Oranges
200
LOWER
10 Oranges
300
FIND
FIXED
LEFT
MID
The following dialogue box will appear:
7.
Click on cell ' A2' or enter ' A2’ in the Text field
8.
Click the 'O K ’ button
9.
Copy the LEN formula down to cells 'C 3 ’ thru 'C 10’
There appears to be an extra space in cells 'A 3’ & ' A4’ after the fruit name ‘Apple’
‘A3 & A4’ f o r t h e f r u it n a m e ' A p p l e ’
10.
R e m o v e th e e x tr a s p a c e in c e l l s
11.
S a v e your changes
12.
Y o u w o u ld n o w b e a b le to r e -r u n y o u r P iv o t T a b le r e p o r t a n d r e s u lts s h o u ld a p p e a r
c o r r e c tly
Example:
Y o u ’v e b e e n g i v e n a E x c e l ® r e p o r t g e n e r a t e d b y a n o t h e r a p p l i c a t i o n .
U p o n r e v i e w y o u s e e th e
c o n te n t in th e c e l l s c o n ta in s e x tr a s p a c e s b e t w e e n a n d a fte r th e w o r d s .
In o r d e r to m a k e th e r e p o r t
u s a b le fo r a n a ly s is a n d p r e s e n ta tio n y o u n e e d to r e m o v e th e e x tr a n e o u s s p a c e s .
Y o u d e c id e to u s e
t h e TRIM function t o r e m o v e t h e s p a c e s .
B e l o w i s a n e x a m p le o f th e r e p o r t s h o w i n g th a t m u s t b e c o r r e c t e d i n o r d e r to c r e a t e a P i v o t
T a b le r e p o r t.
Formula - TRIM
Definition: R e m o v e s a l l e x t r a n e o u s s p a c e s f r o m a c e l l , e x c e p t f o r s i n g l e s p a c e s b e t w e e n w o r d s .
Formula Syntax:
TRIM(text)
te x t is required
1.
O p e n th e F o r m u la s L e n A n d T r im x ls x s p r e a d s h e e t
2.
S e le c t th e ta b n a m e d
3.
C l i c k c e l l ' C2 ’
1-----1
1
1
1
‘Trim’
i
A
FRUIT NAME
1 1
С
8
LEN COUTtT OF
CHA*ACTEfte
1Applet. Bananas, Manges
27
Apples, Bananai, Mangos
i
1 . Kiwi, Oranges. Strawberries
1
1 5 Kiwi,Oranges, Strawberries
23
: ;
i
i 6
!
Blueberries, Raspberries, Blackoernes
Blueberries, Raspberries, Blackberries
27
25
i
TRIM FUNCTION
!
!
3ft
«40
_-TL _---------------------------------------------------------------------------------------------------------------------------- |
4.
F r o m t h e R i b b o n s e l e c t Formulas : Text : TRIM
PageUysut
Formui»
1
1
I■
Щ
■I
'4
Date & Lockup .
Time - Reference * Ti
вднтхт
*
сим
CLEAN
I
I
I
CONOT
DOLLAR
EXACT
FIND
FlitO
til
ШТ
!rie:
L£N
LOWER
MD
WJM8TRVALUE
PROPER
RfPuCE
ft£PT
И6НТ
SEARCH
ЯЮТПѴТЕ
TEXT
TEXTJOIN
TRIM
u n .cha *
UNICOM
UPPER
fx
Insert fu n rtM n -
T h e f o llo w in g d ia lo g u e b o x w i l l a p p ea r:
5.
C l i c k c e l l ' A2 ' o r e n t e r ' A2 ’ i n t h e Text f i e l d
6.
C l i c k t h e ' OK ’ b u t t o n
-
I
a____________4______ г
f R U IT N A M E
i
LTN C O U N T O f
c
o
e
e
f
^
Т КГМ
f U MOV ON
я-имсм» 1
ЦдрЕИ**. Вй г м п к , М * л |с н
A p p le * , Ій п л г ч ъ , M angos
?
k iw i, O f i n g t t ,
K iw i, О гйп | н , І і г і и г і н ч т і і ч
Пы
B k ltb ir fN ir i, f t jf t p t o it r r lt i. O L tc fc tw m ti
Tot
м
t
*
* н № і.
В іП іП іІ.
x \
МкПЦОІ
В Іи е Ь и т іе л . R is p fe e r n n , B l ic k t W T lt l
n » f t r « «Я i j w r i h f l* * t * * rtn iifl t i i « l (И і и р ip M « U f t » ff n магЩ
fn t
fc -ra u a m u t ь Ддоіез Ь і т ш
■i №< i t i f tram wFikT! уйчл w it* ip tH lre ffito e d .
Ыдлде s
pn Отд tunaJaogi
7.
C o p y t h e TRIM f o r m u l a d o w n c e l l s ' C3 ’ th r u ' C7 ’
8.
T h e e x tra s p a c e s h a v e b e e n r e m o v e d
OK
|
Счпсй
Next w e’ll copy and paste as values the contents o f column C and remove the columns (B & C)
used for troubleshooting.
9.
S e l e c t c e l l s ' C2 ’ t h r u ‘C7’
10.
C l i c k t h e ' Copy’ b u t t o n o r p r e s s
11.
S e le c t c e ll
12.
Right-click a n d s e l e c t ‘Paste S p e c ia l.’
13.
S e le c t th e
‘Values’ r a d i o b u t t o n
14.
C l i c k th e
‘OK’ b u t t o n
CTRL+C f r o m y o u r k e y b o a r d
‘A2’
(JEN COUNT Of
FRUIT NAMf
Щ"a j p '^ s Bananas, M angos
A pples, B an an «, M in gos
3 A pples, Bananas, M argos
4 ! Kiwi, Oranges, stra w b * m * f
5
•k
\
3 Kiwi, Orange*. Strawberries
' V
Ktwi, o ra n g es. Stra wb#rr >es
Я
\
Apple?, 0aлапа?, M angos
1 Ki wi , O r a n g « , Strawberries
1
L
1
3 fllu
etfern es, Raspberries, Black berries j
ь Blueberries, Raspberries, B<ac*bernes
7
TRIM FUNCTION
CHARACTERS
Blueberries, Rasp ter n es. Я о і ч т щ
Blueberries. Raspberries, B la c k b a lle d
Р»И* ір«о*І
9
101 Р»і1«
О А"
О All U iing S<4Ji<f iQ fB f
13
*
14
15
О FOfm^i
О ** *|«ЧИ64fWt
О
цШ№И1
Оf
*FhSityiibtt Pg-rmtfh
О £фІИПІ(Л|і
О VUjuts и Щ n u №
11
и
ОІ*1*ІІІ*1
j [ j l u ? ‘-
* ij
16
17
Л
Гo m uls
( т Н м п і і іф іік ііі
O ptjiU dfi
13
19
20
■sfers.'ar
>nto“ft
С'ЬМ'Р'Г
t<JJTIC
О
О ІиЫііЛ
С] {tip Jjlanii
["j Trmipoif
22
I О*
231
24
cwti
‘B’ & ‘C’
15.
S e le c t c o lu m n s
16.
Right-click a n d s e l e c t ‘D elete’, t h e t r o u b l e s h o o t i n g c o l u m n s ‘B’ & ‘C ’ s h o u l d n o w
be rem oved
W e h a v e s u c c e s s f u lly r e m o v e d a ll e x tr a n e o u s s p a c e s fr o m th e r e c o r d s c o n ta in e d in
F u r th e r a n a ly s is a n d r e p o r t in g c a n b e c o m p le t e d w it h o u t e r r o r .
FRUIT NAME
2 A p ple s, Bananas, M angos
3 A p ple s, Bananas, Mangos
4
K iw i, Oranges, S tra w b e rrie s
5
K iw i, Oranges, S traw berries
6
B lu eb errie s, Raspberries, Blackberries.
7
B lu eb errie s, Raspberries, Blackberries
column ‘A’ .
CHAPTER 15
Troubleshooting: How To Resolve Common Pivot Table Errors
B e l o w a r e th e t w o m o s t c o m m o n P iv o t T a b le e r r o r m e s s a g e s w it h in s tr u c tio n s o n h o w to r e s o lv e
th e m .
Please Note: The following is not a comprehensive list o f all Pivot Table error messages, just
a few o f the more common ones.
E rror
'D a ta s o u r c e r e f e r e n c e is n o t v a l i d .’
T y p i c a l l y a p p e a r s w h e n y o u a t t e m p t t o c r e a t e a P i v o t T a b l e , w i t h a blank header row .
&ЛІ.ІЛ№
1H%ON ЫШРСЛЭОЧ
LAST Г*АМЕ
T o r e s o l v e , d e l e t e th e b la n k r o w ( i n th is c a s e r o w
1 ) o r m a k e s u r e y o u s e l e c t th e c o r r e c t h e a d e r
r o w s a n d s u p p o r t i n g d a t a b e f o r e c l i c k i n g Insert : Pivot Table f r o m t h e R i b b o n .
E rro r message:
'W e c a n ’t m a k e th is c h a n g e fo r th e s e l e c t e d c e l l s b e c a u s e it w i l l a f f e c t a P iv o t T a b le .
f ie ld l i s t to c h a n g e th e r e p o r t.
U s e th e
If y o u a r e tr y in g to in s e r t o r d e le t e c e l l s , m o v e th e P iv o t T a b le a n d
tr y a g a in .’
T h is m e s s a g e w i l l a p p e a r w h e n y o u a tte m p t to c h a n g e th e c o lu m n o r d e r , b y c u ttin g & p a s tin g .
e x a m p l e , y o u w a n t t o m o v e t h e ' Total’ c o l u m n t o b e l a s t t h e l a s t .
For
I1
1
1
A t t e w p t T w t o ѵлоѵі
& C ohtM K b y C u ttin g
Sr r a s t w g
A
1
1 t
1
I 1
1
1 2
С
D
1
1
1
1
1
:
1
E
I 3 Row Labels * 'Sum of TOTAL'. Sum of APPLES Sum of ORANGES Sum or MANGOS
j
| 4
Central
€138,571 !
С 43,481
€ 53,278
€41,812
!
! 5
£ast
€ 145,5SS I
€50,626
€47,117
€47,845
|
! 6
West
€ 196,787 j
€69,750
€65,259
€61,778
i
1 7
1
Grand Totat
€480■
,9 4 6 '
€ 163, as 7
€ 165,6S5
€ 1S1,435
i
1
V
T o c h a n g e th e c o lu m n o r d e r in a P iv o t T a b le , c h a n g e th e o r d e r in th e P iv o t T a b le s F ie ld s p a n e :
Г
t
4
( Sum of APPLES
■
■
-
■'.
w
| Sum of M A N G O S
^ Sum of TOTAL
I Row Ы Й 6 0 Sum o f APPLES Sum of” ORANGES” Sum” o f MANGOS "Sum o f TOTAL
Central
€43,4S1
€53,2 7E
€41,81Z
€133,571
East
€ 50,626
£47,117
£47,845
£145,588
West____________ €69,750_________ €65,255________ €61,778
€196,767
jGrand Total
€ 4 8 0 ,9 4 6
€ 161,857
€ 1 6 5 ,6 5 5
(1 5 1 .-1 3 :
T h is m e s s a g e w i l l a ls o a p p e a r w h e n y o u a tte m p t to d e le t e a c a lc u la t e d f ie ld , r o w , o r c o lu m n .
e x a m p le , y o u n o lo n g e r w a n t to s e e th e r o w
For
‘G rand Total’, u n f o r t u n a t e ly , y o u c a n ’ t s i m p l y d e l e t e
th is r o w , y o u ’l l r e c e i v e th e a b o v e e r r o r m e s s a g e .
fl9
100
| 20 Grand Total
To rem ove
1.
$
10,339
$
2,585
$
480,946
*
7,515
16 !
1
I
i
‘G rand Total’ r o w s a n d c o l u m n s w e n e e d t o c h a n g e t h e P i v o t T a b l e d e s i g n .
C l i c k t h e c e l l y o u w o u l d l i k e t o r e m o v e a n d t h e n f r o m t h e t o o l b a r s e l e c t PIVOTTABLE
TOOLS a n d t h e t a b DESIGN
\W И
11
I'.mIJmI.I. І.ІЙІ..І
>lr,. jI
1 ■ TrtAh* LlfOd 1
1
2.
««иIdtfi&j*
nui
■ г* ■ " £ ■*■
■
HrWt ГЫ
ЯЯТ «GtUWOUl
im ряд [
---------- ----ili.ll
C l i c k th e d r o p - d o w n b o x fo r
№
ійП**1
1
tK5№
h |
І
1
1
1
1
‘G rand Totals’ a n d s e l e c t y o u r p r e f e r r e d o p t i o n :
1.
O f f fo r R o w s a n d C o lu m n s
2.
O n fo r R o w s a n d C o lu m n s
3.
O n fo r R o w s O n ly
4.
O n fo r C o lu m n s O n ly
F o r t h i s e x a m p l e , w e w i l l s e l e c t ‘Off for Rows and Columns’
PAGl LAYOUT
FORMULAS
Rcw h+e*<)rn
-
, ■■ ■i - . ■■
EUi Irt
J lv o t lib lr 'it) H Opt>ar
jnd Tattl
Og
R o w tnd C o lu m n
О* It*
С
О
On>T
On Iv
The
‘G rand Total’ r o w h a s n o w b e e n r e m o v e d .
Г19 100
i 20
L
L
$
10,339
f
2,5 S5
16
A Me s s a g e F r o m Th e Au t h o r
Thank you!
Thank you for purchasing and reading this book! Your feedback is valued and
appreciated. Please take a few minutes and leave a review.
Other Books Available By This Author:
1. Microsoft® Excel® Start Here The Beginners Guide
2. The Step-By-Step Guide To The 25 Most Common Microsoft® Excel®
Formulas & Features
3. The Step-By-Step Guide To Pivot Tables & Introduction To Dashboards
(version 2013)
4. The Step-By-Step Guide To The VLOOKUP formula in Microsoft®
Excel®
5. The Microsoft® Excel® Step-By-Step Training Guide Book Bundle
6. Excel® Macros & VBA For Business Users - A Beginners Guide
7. Microsoft® Word® Mail Merge The Step-By-Step Guide
Download