For Full versions of my videos or to join my mailing list go to : http://www.pcwebinars.com This video demonstrates the great new feature in Excel 2013 where you can make a pivot table from more than 1 sheet using table relationships.
Making a Pivot Table from more than 1 table in Excel 2013 Excel 2010 Excel 2016 pivot table tutorial
http://www.youtube.com/user/TomFragale Tom Fragale - Expert Computer Consultant & Trainer Custom On-Site Trainings , Webinars, and Consulting available (215)280-1073
in today's video I want to show you how
to make use the new feature in Microsoft
Excel 2013 that allows you to make a
pivot table from more than one table so
let's go into
Excel uh now notice on sheet one I have
information about the customers uh
including the customer ID and the name
and
address and then if I go to sheet two
notice how we have information about the
orders uh including the order ID and the
customer ID and uh over here if I go to
the right I have the order
amount now in this case the customer ID
is on both tables so when you're doing
this you have to have a a field that is
in common that's going to be the key
step uh now notice how sheet one is
formatted as a table all right so if
your data isn't a table then you would
pick on the home menu uh you would
select all the data and then you pick
home and then you would say format as a
table and then pick one of the formats
so um access will recognize that as a
data set or as a table sheet two needs
to also be a table and right now it is
so like I said if your data uh isn't uh
what what Excel calls a table then you
would select your data you would pick on
your home menu and then pick on format
as a table and then pick one of the
different styles it it's very important
that in both um in both sheets you have
your field names as we do we have our
field names in both sheets so now we're
going to make a pivot table starting
from let's say starting from the
customer table so notice how the
customer table just has the customer
information I would really like to see
uh a total of how of you know each
different order how many orders each
customer had and um you know what what
the sum is for each customer as well
but the information is on two different
sheets so let's see how we're going to
make it work uh I'm going to pick on one
cell and I'll pick on the insert uh the
insert menu to start the pivot table and
I'll pick on pivot
table now in this case it picked the
proper range for us now um what you want
to do is um you're going to put the
result on a new worksheet and you want
to pick where it says add this data to
the data
model and I'll click on
okay now at this point it's going to
bring it to a different
sheet and this is where you would start
to build your pivot table notice over
here on the field list it has the fields
for the customers table only however
what you do is you pick on the word
all and now you're going to see I have
fields from the customer side and I have
fields from the order side as
well so in this case we're going to have
the company name as the rowad
header and you can see each each row
became a different customer now look
what I want to do I'm going to scroll
down and find the fields from the orders
uh uh sheet and i' like to get the order
amount I'm going to move the order
amount into the value
section now when you first do it notice
how all the order amounts are the same
number well I want those to be
individualized for each different
customer so notice what what you're
going to do here um I picked a field
from the first table and I pick a field
from the second table so it says
relationships between the tables may may
be needed I'm going to pick on create
here so in this
case the table that you want to pick at
top is um I want to pick actually the
second sheet that has the
orders and I'll choose the common field
of the customer
ID now the one that you want to pick at
the bottom is actually the table in
which that field is the primary key
notice how um specifically at the bottom
it has the word primary key so that that
really should be the sheet in which that
field is the unique identifier or the
primary key and I'll click on
okay now notice how the numers
recalculated so this is now truly the
sum of each um customers
orders uh so I'll even pick another
field now I'll pick on uh the second
table I would like to see how many C uh
orders that customer had so I'll pick on
order amount a second time and move it
to to the values feel the second time
now I don't want two sums that would be
redundant uh plus it' be repetitious as
well right get it but anyway I'm going
to click on that pull down where it says
sum of order amount you know the second
one we'll go back the value field
settings and this time we'll make it a
count instead of a
sum so now what I have I have the
customer's name I have the sum of the
orders for that customers and the count
of the order for that customer as well
so this was an interesting example of
how you can start making your pivot
tables from more than one uh sheet it
was very important that each sheet was
formatted as a table
and then it was also important that the
sheets had a a common feel in this case
it was the customer ID field and it's
actually also important that in one of
those tables that that customer ID or
that common field is really the primary
key uh you can see they're all different
here and that's really how you can start
to uh make your pivot tables from more
than one uh table or more than one sheet
in Microsoft Excel 2013