馃攳
Pivot Tables: MUST-KNOW for Business & Finance Professionals - YouTube
Channel: Kenji Explains
[0]
what's up everyone it's kenji here and today i聽
thought i'd share how to analyze a large dataset聽聽
[4]
like this one using pivot tables and having them聽
update dynamically using the slicers on the side聽聽
[10]
and you can download the file i'll be working聽
with down in the description so let's get into聽聽
[14]
it let's suppose that we're working at apple and聽
this is the data set that our manager has given us聽聽
[19]
over here as you can see if you go control down聽
arrow you get to the bottom it's about 100 rows聽聽
[24]
long go control back up over here and it's聽
got the breakdown by the region by the type聽聽
[28]
of product that they're selling the price for聽
it the cost per unit the quantity the revenue聽聽
[34]
the expenses and lastly we've got the sales method聽
so this is basically hey are the sales coming in聽聽
[39]
through apple's physical store maybe their online聽
store there's also third parties which could be聽聽
[43]
things like a best buy or a walmart say amazon etc聽
as well as referrals so this is people that get聽聽
[49]
special conditions like what could be employees聽
product reviewers and other people like that and聽聽
[54]
our manager is asking for a series of questions聽
to do with this data set firstly our manager聽聽
[60]
wants to find out the quantity sold in 2021 by聽
region so for that we could go do something like聽聽
[66]
some mips over here and go one by one and try to聽
make it like that maybe even answer the chart but聽聽
[71]
that would be quite a tedious process so instead聽
we're gonna use pivot tables now for that we want聽聽
[76]
to go under the insert tab and over here you'll聽
find the pivot table option just click on that one聽聽
[81]
and you can see that it selects a range and it's聽
basically got our entire table with a data set聽聽
[85]
which is what we want and we want to put it in a聽
new worksheet that's fine for us and then press ok聽聽
[90]
so over here on the right hand side you'll聽
notice that there's the pivot table fields聽聽
[94]
so these are all the conditions that we can tweak聽
and put them in different places so in our case聽聽
[99]
what we we're looking for is the quantity sold聽
and so we want that as the summation as the values聽聽
[104]
that we want out of it so we'll put it down over聽
here on top of that we've got the the region and聽聽
[108]
the column the rows and the columns sorry so over聽
on the rows let's say we put something like the聽聽
[112]
different regions which he's asking for so let's聽
put that over there and you can see that the table聽聽
[117]
starts to auto populate over here on top of that聽
we also need the the breakdown by ear because he's聽聽
[122]
only looking for 20 21. so for that let's go ahead聽
and select the years and just drag that down over聽聽
[127]
on the under the columns now you can see the聽
different types the quantity sold for 2021聽聽
[132]
down over here and where we can easily interpret聽
that hey north america has the highest sales聽聽
[137]
um quantity at least next to next to that there is聽
latam and so on and so forth so it's really that聽聽
[142]
simple let's say that we report these findings to聽
our manager and now he wants to know the average聽聽
[147]
sale price by region and year so for that聽
if we go back to the pivot table over here聽聽
[152]
we were fine with the regions being under the聽
rows and the years on being under the columns聽聽
[157]
the only thing we want to change is聽
instead of the sum of quantities sold聽聽
[160]
we can just drag that out and you'll notice there聽
is an x sign that means i will take it out so聽聽
[164]
click there and that should be out of there聽
and what we want to put inside there instead聽聽
[169]
is the price per unit so we want to find the聽
average price so we'll go ahead and select that聽聽
[173]
but you'll notice that now it's the sum of聽
price per unit which is not quite right so聽聽
[177]
we'll click over here under the drop down聽
and you want to go under value field setting聽聽
[182]
and here we want to change that to the average聽
and as you can see there's a bunch of different聽聽
[185]
things that you can change it to the minimums聽
the products etc in our case we're fine with the聽聽
[190]
average so we'll hit ok and now let's go ahead and聽
reformat this as it's not looking too good so ctrl聽聽
[196]
shift down arrow ctrl shift right arrow from there聽
press ctrl 1 and now you want to go under under聽聽
[202]
the number tab here we don't really want decimals聽
we don't need them and then use the separator聽聽
[206]
press ok and so now we can see that for 2021 it聽
seems like the the highest average sale price has聽聽
[213]
to do with the apac region um followed by emea and聽
so on and so forth so it's interesting to see here聽聽
[218]
that asia asia pacific actually has the highest聽
sale price so they're probably buying more of聽聽
[222]
the iphones the imacs the more expensive stuff聽
like that while the lowest region here is the聽聽
[227]
latam region and maybe they're only buying say eye聽
watches and airpods other things of that nature聽聽
[234]
and because we're good employees and we want to聽
go that extra mile we tell our manager that just聽聽
[238]
looking at the average sale price doesn't really聽
tell us the whole picture we're not really looking聽聽
[241]
at things like profitability so he says ditch the聽
three years and instead just do the revenues minus聽聽
[246]
the expenses and find out the profitability聽
by region so let's go ahead and do that聽聽
[252]
now he said to this to three years so we're just聽
going to take out the years column over here聽聽
[255]
and instead we're just going to have the regions聽
and we don't want the average price per unit so聽聽
[259]
we'll remove that instead we want the revenues so聽
just drag that in we also want to get the expenses聽聽
[265]
so now we've we've got the revenues and the聽
expenses but we don't actually have the the聽聽
[269]
profitability and that's not actually a line on聽
the pivot on the data set that we've got over here聽聽
[274]
so we're going to have to create it for that you聽
can just go under the pivot table analyze tab here聽聽
[279]
then we're going to go to fields and we want聽
to calculate a field so we're going to create聽聽
[284]
basically a new field that's going to be up in聽
here and we want to call that something like聽聽
[288]
say profit and the formula is just going to be the聽
the revenues that we've got here insert the field聽聽
[295]
and then put a minus sign and we want to also add聽
the expenses and insert that field then press ok聽聽
[302]
now you can see that we've got the the profit over聽
here which is just basically the revenues minus聽聽
[306]
the expenses as it should be and from this we can聽
also see that it seems like the apac region has聽聽
[311]
the highest profit probably got to do with the聽
fact that they also have the average sale price聽聽
[316]
so we send our manager these findings and聽
he says to put it in some sort of a chart聽聽
[320]
because it doesn't really look all that good in聽
this table so for that we can just go under the聽聽
[324]
pivot table analyze and you'll notice there is聽
a pivot chart button here so let's click on that聽聽
[329]
from there we're fine with a cluster column press聽
ok and now that's looking slightly more like it聽聽
[334]
one thing you'll notice is that we got all of聽
these boxes which really don't look that good and聽聽
[338]
we don't really need them so we'll go under pivot聽
table analyze again and click on this button here聽聽
[342]
under fields button and that's going to remove聽
them for us so that's looking slightly cleaner聽聽
[346]
also you'll notice that on the legends we've聽
got the sum of revenues some of the expenses聽聽
[351]
we don't really need the sum of so we can just聽
have revenues expenses etc for that we're going聽聽
[355]
to have to go under pivot chart fields sorry under聽
the values once we press the drop down we want to聽聽
[360]
go under value field settings and then here we聽
just want to type revenues instead of the sum of聽聽
[366]
delete that and press enter but you'll notice聽
it says this name already exists and so what聽聽
[372]
we want to do instead is just put a space right聽
in front of the revenues press ok and now we can聽聽
[377]
do that same thing with the expenses value聽
field settings and we'll just put expenses聽聽
[383]
and put a space in front press ok and lastly聽
for the profit we'll do the exact same thing聽聽
[388]
value field settings profit press ok one really聽
cool feature about this type of chart is that聽聽
[394]
it's fully dynamic so for example if we want to聽
remove the profits and just have the revenues and聽聽
[399]
the expenses we can take that out and you can see聽
that the chart automatically updates and if you're聽聽
[404]
enjoying this video on pivot tables we do have聽
an excel for business and finance course where we聽聽
[409]
teach everything we know about excel specifically聽
for people either looking to break into a business聽聽
[414]
or a finance role or those in it trying to level聽
up their excel game unlike most theoretical聽聽
[419]
courses we try to make this one as practical as聽
possible based on our real experiences working at聽聽
[424]
companies like tesla or amazon so aside from the聽
typical lessons on formatting formulas and charts聽聽
[430]
we have case studies that much like this video聽
replicate the type of work you might be assigned聽聽
[435]
in your day-to-day ranging from financial modeling聽
to cleaning a data set and presenting some visual聽聽
[440]
insights so if you're interested in checking聽
it out you can go to a link in the description聽聽
[445]
below now let's move on to a more advanced pivot聽
table like the one we saw at the beginning of the聽聽
[450]
video and let's say that our manager wants to聽
find out the quantity breakdown depending on聽聽
[455]
the sales method by product and depending聽
on the year as well so basically he wants聽聽
[459]
to see if hey if you buy the product in store it聽
doesn't make a difference to the type of product聽聽
[463]
that you might buy same thing with online聽
maybe you feel more trustworthy when you go聽聽
[468]
in store as opposed to buying it online so all聽
of these trends you want to try find out so for聽聽
[472]
that let's go ahead and create a pivot table聽
again so go under the insert pivot table okay聽聽
[478]
and what we want to put here is the quantity sold聽
that's going to be the summation over here then聽聽
[483]
we've got all of the different the sales methods聽
that's going to be under the rows for us and we聽聽
[488]
also want to put a subcategory in there which聽
is going to be the the product so we're going聽聽
[494]
to have the breakdown like you can see here for聽
the in-store depending on the types of products聽聽
[498]
that there are and this is a drop down so you can聽
close it and open it depending on what you want聽聽
[502]
we also want to put the uh the years under the聽
column over here so let's go ahead and select that聽聽
[507]
and drag it over now that's looking slightly聽
more like it also let's add another column聽聽
[511]
up here so we'll do control control space and聽
then control plus ctrl shift plus sorry for the聽聽
[517]
decimals we don't really need them so we're gonna聽
select everything ctrl shift down arrow and then聽聽
[521]
ctrl shift right arrow and go to alt h9 based聽
on this data over here we can see that third聽聽
[526]
party sales are the ones that are um selling the聽
most and followed by that we've got in store in聽聽
[532]
particular it seems to be the airpods that are the聽
best-selling products now from there we show our聽聽
[536]
manager this and he says that he really likes it聽
so he wants to send it to the management team but聽聽
[541]
you know that the management team isn't all that聽
professional with pivot tables and so we want to聽聽
[545]
create some sort of a slicer which is going to be聽
a drop down for them to be able to move things and聽聽
[550]
change things around a bit more easily than using聽
the pivot table fields which they're probably not聽聽
[554]
familiar with so for that go under the pivot聽
table analyze and we want to go under insert聽聽
[559]
slicer and here's the different slicers that we聽
can insert which are basically all of the fields聽聽
[564]
now let's put one for a region so they can select聽
the different regions for here as well as that's聽聽
[569]
probably something interesting for them to know聽
and we can also create a third one by sales method聽聽
[574]
hit the ok key now we've got these three different聽
slicers let's say we put them over here move聽聽
[580]
them around a bit let me just reformat them and聽
fast forward this so you don't have to watch it
[588]
nice so now we've got three different slicers聽
over here so let's say we only want 2019聽聽
[592]
you'll see that the table updates dynamically聽
2021 same thing over here and you'll notice聽聽
[597]
that you can actually select two anymore for聽
that you're going to have to click over here聽聽
[601]
and that's going to allow us to multi-select and聽
then this last thing over here that you've got on聽聽
[606]
the side is to remove the filter if you click聽
on that it's just going to select everything聽聽
[610]
so if we put email here and then we click back on聽
this it's just going to select everything for us聽聽
[614]
now it's a lot easier for people to interpret this聽
one thing though they might not really know what a聽聽
[618]
slicer is and maybe they haven't used one before聽
so for that we can just go under the slicer tab聽聽
[623]
here and we're going to change the the slicer聽
caption from here to something like select here聽聽
[630]
here below so that's a bit more explanatory for聽
them and they probably get a better idea of it聽聽
[637]
let's not work on the design of this as it's聽
not looking too good to send so firstly let's聽聽
[641]
remove the grid lines alt w vg is going to be the聽
shortcut for that also we want to make this a bit聽聽
[647]
bigger so you can see that the columns are a bit聽
too tight so let's select them by pressing the聽聽
[652]
control space and then shift right arrow to select聽
the the last four here and what you want to press聽聽
[657]
is the alt how and from there for the column width聽
let's put something like 12 press enter now that's聽聽
[663]
looking a bit more spaced out which is probably聽
nicer if you want to you can change the design聽聽
[667]
over here where you've got the different color聽
ranges and so on you can also do it more manually聽聽
[672]
so for instance we can select this top area over聽
here and from there just go to alt h and we could聽聽
[678]
select say a dark blue over here and change the聽
colors of the actual letters into white so alt hfc聽聽
[684]
and we'll pick white press enter now that's聽
looking a lot more presentable to send to聽聽
[688]
the management team if you want to check out聽
our excel course and go to this link over here聽聽
[692]
if you want to learn how to become faster on聽
excel using formulas check out this link over here聽聽
[697]
or if you want to learn some cool shortcuts聽
check out this other link over here that's all聽聽
[701]
for this one hit that like hit that subscribe聽
if you liked it i'll catch you in the next one
Most Recent Videos:
You can go back to the homepage right here: Homepage





