Sort and filter a PivotTable, and show the top 10
PivotTables8 minPremium
Builds on Summarize a list with a PivotTable and Filter a list to the rows you need.
A wine importer in Bordeaux sells to 40 restaurants and shops. For the sales meeting, the director wants the ten biggest customers on one page, biggest first, and a list of the regions that passed €50,000.
How it works
A PivotTable sorts and filters its items, and both can go by the numbers instead of the names.
- To sort by the totals, right-click a number in the value column and choose Sort > Sort Largest to Smallest. Or open the arrow on Row Labels, choose More Sort Options, then Descending (Z to A) by and the value field, such as Sum of Sales. The order stays set, so the items sort again after each refresh.
- Label Filters, in the same menu, test the item names: begins with, contains, between.
- Value Filters test each item's total: greater than, between, and Top 10, which keeps the top or bottom items by a value field. Change 10 to the number you need, and choose items, percent or sum.
A filter on the numbers keeps working when the data changes, so next month's top five show up after a refresh. Five names ticked in the filter list stay the same five whoever sells most. The Grand Total adds up only the items that are showing. To show every item again, choose Clear Filter From in the same menu.
Example
The director's PivotTable has Customer in Rows and Sales in Values. Value Filters > Top 10, set to Top, 10, Items, by Sum of Sales, keeps the ten biggest customers. Sort Largest to Smallest then puts the biggest one on the first row, and the Grand Total becomes the sales of those ten.
Common mistakes
- Ticking the five biggest names in the filter list. It looks right today, and next month it shows the same five even when another customer passes them. Use Top 10.
- Top 10 without a sort. The filter keeps the right customers but lists them A to Z. Sort largest to smallest as well.
- Greater Than Or Equal To for "over €50,000". A region at exactly €50,000 stays in. Choose Greater Than.
In short
- Sort by a value field, largest to smallest, from a right-click or the Row Labels menu.
- Label Filters test the names and Value Filters test the totals. Top 10 keeps the top or bottom few.
- Filters that use the numbers follow the data, while ticked names stay as they are.
Practice
Premium4 exercises: 3 PivotTables and 1 quiz question.
Practice is part of Premium
Every lesson is free to read, and you can practice the free lessons without an account. This lesson's exercises are part of Premium, which you add to a free account.
Have one? Sign in