Confident CellsExcel practice Start free

PivotTables: Top 10 and value filters: practice exercises

Top 10, Value Filters, Label Filters, Begins With, Contains, the top items in each group, Clear Filter. 8 exercises on real-looking data, each checked as you go. The full lesson is part of Pro.

In the lesson

This lesson has a PivotTable builder like Excel's: drag fields into Rows, Columns and Values, and each task is checked as you go.

Open the PivotTables: Top 10 and value filters lesson

How it works

The ▾ list on Row Labels (or Column Labels) does more than tick items. Value Filters keeps items by their numbers: Top 10 for the biggest few, or Greater Than a figure. Label Filters keeps items by their names, such as those that Begin With B.

Unlike unticking items by hand, a filter keeps working when the data changes: next month's top 3 are worked out again on Refresh. To take one off, choose Clear Filter From in the same list.

Top 10

Seven suppliers sold £4,820, £3,910, £3,050, £2,700, £1,240, £860 and £410 of stationery to a school. The top 3 are the first three, worth £11,780 between them.

Row LabelsSum of Cost (£)
Brightwell Paper4820
Evans Office3910
Harper & Co3050
Grand Total11780

To get that in a PivotTable, open Row Labels ▾, choose Value Filters, then Top 10. Change 10 to 3, leave Items, and choose the value to rank by. Bottom gives the smallest instead.

The Grand Total adds up only the items that show. The filter keeps the right 3 when the data changes and you Refresh.

Value filters

A month's branch totals: Derby £14,200, Leicester £11,900, Nottingham £16,050 and Lincoln £8,300. The branches over £12,000 are Derby and Nottingham, £30,250 together.

In the PivotTable: Row Labels ▾, Value Filters, Greater Than, then type 12000. The other choices work the same way: Less Than, Between, Equals and so on.

Greater Than doesn't include the number itself: a branch with exactly £12,000 would be left out. Use Greater Than Or Equal To to keep it.

Label filters

Label filters look at the names, not the numbers. Begins With B keeps Bakers Office Supplies and Brightwell Paper, and drops Cartwright Supplies. Contains pens keeps Pens and Whiteboard pens, and drops Pencils.

They ignore capital letters. In the box, * stands for any run of characters and ? for one character, so Equals B*Paper finds Brightwell Paper.

Within each group, and clearing

With Department and Item both in Rows, a Top 10 filter on Item works inside each department: the top 2 items in Maths, the top 2 in Science, and so on. In Compact Form, pick the field with Select field at the top of the ▾ list.

A field keeps one filter at a time. A new label or value filter replaces the old one, and so does unticking items by hand. To take a filter off, choose Clear Filter From in the ▾ list.

PivotTable filters at a glance

Every one starts from the ▾ arrow beside Row Labels (or beside the field's name in Tabular Form). The examples use the school stationery orders from the Learn cards, where seven suppliers sold £16,990 between them.

You wantChooseSettingsWhat you get
The top 3Value Filters › Top 10Top, 3, Items, by Sum of CostBrightwell Paper, Evans Office and Harper & Co, £11,780
The bottom 2Value Filters › Top 10Bottom, 2, ItemsThe 2 smallest suppliers, £860 and £410
Everything over an amountValue Filters › Greater Than700The 6 suppliers over £700
Names starting with a letterLabel Filters › Begins WithBBakers Office Supplies, Brightwell Paper
Names with a word in themLabel Filters › ContainspensPens and Whiteboard pens; Pencils goes
The top 2 in each groupValue Filters › Top 10 on the inner fieldTop, 2, ItemsThe 2 biggest items in each department
Everything backClear Filter From "Supplier"All 7 suppliers

In the Top 10 box, Items keeps a number of rows. Percent keeps the biggest items that together make up that percentage of the total, and Sum keeps the biggest items until their total reaches the amount you type. In Excel for Mac, click the same ▾ arrow: the label and value filters, Top 10 among them, are in the box that opens.

Top 10 picks, sorting puts in order

A Top 10 filter keeps the right items but leaves them in the order they were in, usually A to Z. To list them largest first, open the same ▾ arrow and choose Sort Largest to Smallest by Sum of Cost, or click a number in the Values column and use Data › Sort Largest to Smallest (Descending on a Mac). The filter and the sort stay when you Refresh.

When a Top 10 filter looks wrong

For a top 5 that updates by itself without a PivotTable, see rank and find the top 5, which uses LARGE, or SORT and TAKE in Excel 365.

What you'll practise

  1. The bursar wants to know where most of the money goes. Make a PivotTable of the total cost for each supplier, then show only the top 3 suppliers with a Top 10 filter.
  2. Which 2 departments spent the least? Keep just those 2 in the PivotTable with a Top 10 filter set to Bottom.
  3. Suppliers paid more than £700 this year have to be checked by the finance office. Show only those suppliers, with a value filter.
  4. Show only the suppliers whose names begin with B, with a label filter.
  5. How much went on pens of any kind? Keep the items whose names contain the word pens. (Pencils shouldn't count.)
  6. Each head of department wants to see their own 2 biggest items. Filter Item (not Department) to the top 2: a filter on the inner field works within each department.
  7. Make a PivotTable of the top 3 departments by total cost, listed largest first. (A Top 10 filter picks them; sorting puts them in order.)
  8. Last week someone left a Top 3 filter on Supplier. The auditor wants every supplier back. Take the filter off.

Guide with worked examples: Rank in Excel, and find the top 5

Questions

How do I show only the top 10 in a pivot table?

Click the ▾ arrow beside Row Labels, choose Value Filters, then Top 10. Leave Top and 10, or change the number, keep Items, and pick the value to rank by, such as Sum of Sales. Click OK. In Excel for Mac, the same filters are in the box the ▾ arrow opens. The Grand Total then adds up only the items that show.

Why does my pivot table Top 10 show the wrong items or more than 10?

More than 10 means items tie for the last place, and Excel keeps them all. The wrong items usually means the filter is on the wrong field, such as the outer field in Rows instead of the inner one, or it ranks by the wrong value field. Check the by box in the Top 10 filter, and refresh the PivotTable if the data has changed.

How do I show the top 3 in each category of a pivot table?

Put the category and the item both in Rows, category first. Then put the Top 10 filter on the inner field, the item, set to Top 3. Excel applies it inside each category, so you get the 3 biggest items in every department or region. A Top 3 on the category field would keep 3 whole categories instead.

How do I sort a pivot table Top 10 largest first?

The filter picks the items but doesn't sort them. Open the ▾ arrow beside Row Labels and choose Sort Largest to Smallest, or More Sort Options, Descending, by the value field. On Windows you can also click a number in the Values column and use Data › Sort Largest to Smallest; on a Mac, Data › Descending. The sort stays when you refresh.