[MUSIC]
In this next section we're going to go over how to sort a pivot table.
So we've looked at this a little and some of our past examples but
there are even more sort functions that we haven't gotten into yet.
In problem 4a,
we're going to sort the distributors in alphabetical order by first name.
So it looks like here we have the distributors from Panama and
their revenue.
So I'll click the dialog box next to distributor to show our sort functions.
And currently since Sort Z to A is highlighted,
it looks like that is what we're using.
But we want this in alphabetical order, so I'm going to change this to Sort A to Z.
And now we can see that we have our table in alphabetical order by first name.
Now problem 4b is a little more complicated because we have the quantity
of products broken down by sales channel.
Here, the question is asking us to sort both the products and
the sales channel in descending order by sum of quantity.
Just as in our past example,
we can click the dialogue box next to Products to see our sort options.
Here, you can see that there's already a Select Field option.
Though this menu is helpful it's always better to look at the more sort option,
so you can see all of your options and
what is the easiest way to go about sorting your data.
So here you can see the options, ascending and descending, and
we would like to sort descending order.
On the top of this menu, it says select field and has a drop down menu.
The drop down menu shows both sales channel and product.
So this is what we are going to sort by.