Filter on excel pivot table

PivotTables are great for taking large datasets and creating in-depth detail summaries. 

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

You can insert one or more slicers for a quick and effective way to filter your data. Slicers have buttons you can click to filter the data, and they stay visible with your data, so you always know what fields are shown or hidden in the filtered PivotTable.

  1. Select any cell within the PivotTable, then go to Pivot Table Analyze > Insert Slicer Slicer.

  2. Select the fields you want to create slicers for. Then select OK.

  3. Excel will place one slicer on the worksheet for each selection you made, but it’s up to you to arrange and size them however is best for you.

  4. Click the slicer buttons to select the items you want to show in the PivotTable.

Slicer choices with the multi-select button highlighted

Manual filters use AutoFilter. They work in conjunction with slicers, so you can use a slicer to create a high-level filter, then use AutoFilter to dive deeper.

  1. To display AutoFilter, select the Filter drop-down arrow  Filter drop-down arrow, which varies depending on the report layout.

    Compact Layout

    A PivotTable in the default Compact form with the Value field in the Rows area

    A PivotTable in the default Compact form with the Value field in the Columns area

    The Value field is in the Rows area

    The Value field is in the Columns area

    Outline/Tabular Layout

    A PivotTable in Outline or Tabular form

    Displays the Values field name in the top left corner

  2. To filter by creating a conditional expression, select Label Filters, and then create a label filter.

  3. To filter by values, select Values Filters and then create a values filter.

  4. To filter by specific row labels (in Compact Layout) or column labels (in Outline or Tabular Layout), uncheck Select All, and then select the check boxes next to the items you want to show. You can also filter by entering text in the Search box.

  5. Select OK.

Tip: You can also add filters to the PivotTable’s Filter field. This also gives you the ability to create individual PivotTable worksheets for each item in the Filter field. For more information, see Use the Field List to arrange fields in a PivotTable.

You can also apply filters to show the top or bottom 10 values or data that meets the certain conditions.

  1. To display AutoFilter, select the Filter drop-down arrow  Filter drop-down arrow, which varies depending on the report layout.

    Compact Layout

    A PivotTable in the default Compact form with the Value field in the Rows area

    A PivotTable in the default Compact form with the Value field in the Columns area

    The Value field is in the Rows area

    The Value field is in the Columns area

    Outline/Tabular Layout

    A PivotTable in Outline or Tabular form

    Displays the Values field name in the top left corner

  2. Select Values Filters Top 10.

  3. In the first box, select Top or Bottom.

  4. In the second box, enter a number.

  5. In the third box, do the following:

    • To filter by number of items, pick Items.

    • To filter by percentage, pick Percentage.

    • To filter by sum, pick Sum.

  6. In the fourth box, select a Values field.

By using a report filter, you can quickly display a different set of values in the PivotTable. Items you select in the filter are displayed in the PivotTable, and items that are not selected will be hidden. If you want to display filter pages (the set of values that match the selected report filter items) on separate worksheets, you can specify that option.

Add a report filter

  1. Click anywhere inside the PivotTable.

    The PivotTable Fields pane appears.

  2. In the PivotTable Field List, click on the field in an area and select Move to Report Filter.

You can repeat this step to create more than one report filter. Report filters are displayed above the PivotTable for easy access.

  • To change the order of the fields, in the Filters area, you can either drag the fields to the position that you want, or double-click on a field and select Move Up or Move Down. The order of the report filters will be reflected accordingly in the PivotTable.

Display report filters in rows or columns

  1. Click the PivotTable or the associated PivotTable of a PivotChart.

  2. Right-click anywhere in the PivotTable, and then click PivotTable Options.

  3. In the Layout tab, specify these options:

    1. In Report Filter area, in the Arrange fields list box, do one of the following:

      • To display report filters in rows from top to bottom, select Down, Then Over.

      • To display report filters in columns from left to right, select Over, Then Down.

    2. In the Filter fields per column box, type or select the number of fields to display before taking up another column or row (based on the setting of Arrange fields you specified in the previous step).

Select items in the report filter

  1. In the PivotTable, click the dropdown arrow next to the report filter.

  2. Select the checkboxes next to the items that you want to display in the report. To select all items, click the checkbox next to (Select All).

    The report filter now displays the filtered items.

Display report filter pages on separate worksheets

  1. Click anywhere in the PivotTable (or the associated PivotTable of a PivotChart ) that has one or more report filters.

  2. Click PivotTable Analyze (on the ribbon) > Options > Show Report Filter Pages.

  3. In the Show Report Filter Pages dialog box, select a report filter field, and then click OK.

  1. In the PivotTable, select one or more items in the field that you want to filter by selection.

  2. Right-click an item in the selection, and then click Filter.

  3. Do one of the following:

    • To display the selected items, click Keep Only Selected Items.

    • To hide the selected items, click Hide Selected Items.

      Tip: You can display hidden items again by removing the filter. Right-click another item in the same field, click Filter, and then click Clear Filter.

If you want to apply multiple filters per field, or if you don’t want to show Filter buttons in your PivotTable, here’s how you can turn these and other filtering options on or off:

  1. Click anywhere in the PivotTable to show the PivotTable tabs on the ribbon.

  2. On the PivotTable Analyze tab, click Options.

    1. In the PivotTable Options dialog box, click the Totals & Filters tab.

    2. In the Filters area, check or uncheck the Allow multiple filters per field box depending on what you need.

    3. Click the Display tab, and then check or uncheck the Display Field captions and filters check box, to show or hide field captions and filter drop downs.

You can view and interact with PivotTables in Excel for the web by creating slicers and by manual filtering.

Slicers provide buttons that you can click to filter tables, or PivotTables. In addition to quick filtering, slicers also indicate the current filtering state, which makes it easy to understand what exactly is currently displayed.

Slicer with selected items

For more information, see Use slicers to filter data.

If you have the Excel desktop application, you can use the Open in Excel button to open the workbook and create new slicers for your PivotTable data there. Click Open in Excel and filter your data in the PivotTable.

Manual filters use AutoFilter. They work in conjunction with slicers, so you can use a slicer to create a high-level filter, then use AutoFilter to dive deeper.

  1. To display AutoFilter, select the Filter drop-down arrow  Filter drop-down arrow, which varies depending on the report layout.

    Single Column

    The default Layout form with the Value field in the Rows area
    The default Layout displays the Value field in the Rows area

    Separate Column

    The Separate Column Layout form with the nested Row field in a distinct column

    Displays the nested Row field in a distinct column

  2. To filter by creating a conditional expression, select <Field name>Label Filters, and then create a label filter.

  3. To filter by values, select <Field name>Values Filters and then create a values filter.

  4. To filter by specific row labels, select Filter, uncheck Select All, and then select the check boxes next to the items you want to show. You can also filter by entering text in the Search box.

  5. Select OK.

Tip: You can also add filters to the PivotTable’s Filter field. This also gives you the ability to create individual PivotTable worksheets for each item in the Filter field. For more information, see Use the Field List to arrange fields in a PivotTable.

  1. Click anywhere in the PivotTable to show the PivotTable tabs (PivotTable Analyze and Design) on the ribbon.

  2. Click PivotTable Analyze > Insert Slicer.

  3. In the Insert Slicers dialog box, check the boxes of the fields you want to create slicers for.

  4. Click OK.

    A slicer appears for each field you checked in the Insert Slicers dialog box.

  5. In each slicer, click the items you want to show in the PivotTable.

Slicer with selected items

Tip: To change how the slicer looks, click the slicer to show the Slicer tab on the ribbon. You can apply a slicer style or change settings using the various tab options.

  1. In the PivotTable, click the arrow Filter drop-down arrow on Row Labels or Column Labels.

  2. In the list of row or column labels, uncheck the (Select All) box at the top of the list, and then check the boxes of the items you want to show in your PivotTable.

  3. The filtering arrow changes to this icon Applied filter icon to indicate that a filter is applied. Click it to change or clear the filter by clicking Clear Filter From <Field Name>.

    To remove all filtering at once, click PivotTable Analyze tab > Clear > Clear Filters.

By using a report filter, you can quickly display a different set of values in the PivotTable. Items you select in the filter are displayed in the PivotTable, and items that are not selected will be hidden. If you want to display filter pages (the set of values that match the selected report filter items) on separate worksheets, you can specify that option.

Add a report filter

  1. Click anywhere inside the PivotTable.

    The PivotTable Fields pane appears.

  2. In the PivotTable Field List, click on the field in an area and select Move to Report Filter.

You can repeat this step to create more than one report filter. Report filters are displayed above the PivotTable for easy access.

  • To change the order of the fields, in the Filters area, you can either drag the fields to the position that you want, or double-click on a field and select Move Up or Move Down. The order of the report filters will be reflected accordingly in the PivotTable.

Display report filters in rows or columns

  1. Click the PivotTable or the associated PivotTable of a PivotChart.

  2. Right-click anywhere in the PivotTable, and then click PivotTable Options.

  3. In the Layout tab, specify these options:

    1. In Report Filter area, in the Arrange fields list box, do one of the following:

      • To display report filters in rows from top to bottom, select Down, Then Over.

      • To display report filters in columns from left to right, select Over, Then Down.

    2. In the Filter fields per column box, type or select the number of fields to display before taking up another column or row (based on the setting of Arrange fields you specified in the previous step).

Select items in the report filter

  1. In the PivotTable, click the dropdown arrow next to the report filter.

  2. Select the checkboxes next to the items that you want to display in the report. To select all items, click the checkbox next to (Select All).

    The report filter now displays the filtered items.

Display report filter pages on separate worksheets

  1. Click anywhere in the PivotTable (or the associated PivotTable of a PivotChart ) that has one or more report filters.

  2. Click PivotTable Analyze (on the ribbon) > Options > Show Report Filter Pages.

  3. In the Show Report Filter Pages dialog box, select a report filter field, and then click OK.

You can also apply filters to show the top or bottom 10 values or data that meets the certain conditions.

  1. In the PivotTable, click the arrow Filter drop-down arrow next to Row Labels or Column Labels.

  2. Right-click an item in the selection, and then click Filter > Top 10 or Bottom 10.

  3. In the first box, enter a number.

  4. In the second box, pick the option you want to filter by. The following options are available:

    • To filter by number of items, pick Items.

    • To filter by percentage, pick Percentage.

    • To filter by sum, pick Sum.

  5. In the search box, you can optionally search for a particular value.

  1. In the PivotTable, select one or more items in the field that you want to filter by selection.

  2. Right-click an item in the selection, and then click Filter.

  3. Do one of the following:

    • To display the selected items, click Keep Only Selected Items.

    • To hide the selected items, click Hide Selected Items.

      Tip: You can display hidden items again by removing the filter. Right-click another item in the same field, click Filter, and then click Clear Filter.

If you want to apply multiple filters per field, or if you don’t want to show Filter buttons in your PivotTable, here’s how you can turn these and other filtering options on or off:

  1. Click anywhere in the PivotTable to show the PivotTable tabs on the ribbon.

  2. On the PivotTable Analyze tab, click Options.

    1. In the PivotTable Options dialog box, click the Layout tab.

    2. In the Layout area, check or uncheck the Allow multiple filters per field box depending on what you need.

    3. Click the Display tab, and then check or uncheck the Field captions and filters check box, to show or hide field captions and filter drop downs.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Video: Filter data in a PivotTable

Create a PivotTable to analyze worksheet data

Create a PivotTable to analyze external data

Create a PivotTable to analyze data in multiple tables

Sort data in a PivotTable

Group or ungroup data in a PivotTable

There are different ways you can filter data in a Pivot Table in Excel.

As you’ll go through this tutorial, you’ll see there are different data filter options available based on the data type.

Types of Filters in a Pivot Table

Here is a demo of the types of filters available in a Pivot Table.

Filter Data in a Pivot Table in Excel - All filters

Let’s look at these filters one by one:

  • Report Filter: This filter allows you to drill down into a subset of the overall dataset. For example, if you have retail sales data, you can analyze data for each region by selecting one or more than regions (yes, it allows multiple selections as well). You create this filter by dragging and dropping the Pivot Table field into the Filters area.
  • Row/Column Label Filter: These filters allow you to filter relevant data based on the field items (such as filter specific item or item that contains a specific text) or the values (such as filter top 10 items by value or items with a value greater than/less than a specified value).
    • Search Box: You can access this filter within the row/column label filter and this allows you to quickly filter based on the text you enter. For example, if you want data for Costco only, just type Costco here and it will filter that for you.
    • Check Boxes: These allow you to select specific items from a list. For example, if you want to hand pick retailers to analyze, you can do this here. Alternatively, you can also selectively exclude some retailers by unchecking it.

Note, there are two more filtering tools available to a user: Slicers and Timelines (which are not covered in this tutorial).

Let’s see some practical examples of how to use these to filter data in a Pivot Table.

Examples of Using Filters in Pivot Table

The following examples are covered in this section:

  • Filter Top 10 Items by Value/Percent/Sum.
  • Filter Items based on Value.
  • Filter Using Label Filter.
  • Filter Using Search Box.

Filter Top 10 Items in a Pivot Table

You can use the top 10 filter option in a Pivot Table to:

  • Filter top/bottom items by value.
  • Filter top/bottom items that make up a Specified Percent of the Values.
  • Filter top/bottom Items that make up a Specified Value.

Suppose you have a Pivot Table as shown below:
Filter Data in a Pivot Table in Excel - Dataset Top 10

Let’s see how to use the Top 10 filter with this data set.

Filter Top/Bottom Items by Value

You can use the Top 10 filter to get a list of top 10 retailers based on the sales value.

Here are the steps to do this:

  • Go to Row Label filter –> Value Filters –> Top 10.Filter Data in a Pivot Table in Excel - Value Top 10
  • In the Top 10 Filter dialog box, there are four options that you need to specify:

This will give you a filtered list of 10 retailers based on their sales value.

Filter Data in a Pivot Table in Excel - Top 10 items result

You can use the same process to get the bottom 10 (or any other number) items by value.

Filter Top/Bottom Items that make up a Specified Percent of the Value

You can use the top 10 filter to get a list of top 10 percent (or any other number, say 20 percent, 50 percent, etc.) of items by value.

Let’s say you want to get the list of retailers that make up 25% of the total sales.

Here are the steps to do this:

  • Go to Row Label filter –> Value Filters –> Top 10.Filter Data in a Pivot Table in Excel - Value Top 10
  • In the Top 10 Filter dialog box, there are four options that you need to specify:

This will give you a filtered list of retailers that make up 25% of the total sales.

Filter Data in a Pivot Table in Excel - percent result

You can use the same process to get the retailers that make up the bottom 25% (or any other percentage) of the total sales.

Filter Top/Bottom Items that make up a Specified Value

Let’s say you want to find out the top retailers that account for 20 million in sales.

You can do this using the Top 10 filter in the Pivot Table.

To do this:

  • Go to Row Label filter –> Value Filters –> Top 10.Filter Data in a Pivot Table in Excel - Value Top 10
  • In the Top 10 Filter dialog box, there are four options that you need to specify:

This will give you a filtered list of top retailers that make up 20 Million of the total sales.

Filter Data in a Pivot Table in Excel - Sum 20Mil result

Filter Items based on Value

You can filter items based on the values in the columns in the values area.

Suppose you have a pivot table created using retail sales data as shown below:

Filter Data in a Pivot Table in Excel - Dataset Top 10

You can filter this list based on the sales value. For example, suppose you want to get a list of all the retailers that have sales more than 3 million.

Here are the steps to do this:

  • Go to Row Label filter –> Value Filters –> Greater Than.Filter Data in a Pivot Table in Excel - by value filter
  • In the Value Filter dialog box:
  • Click OK.

This would instantly filter the list and show only those retailers that have sales more than 3 million.

Filter Data in a Pivot Table in Excel - by value result

Similarly, there are many other conditions that you can use such as equal to, does not equal to, less than, between, etc.

Filter Data in a Pivot Table in Excel - other value filter

Filter Data Using Label Filters

Label filters come in handy when you have a huge list and you want to filter specific items based on its name/text.

For example, in the list of retailers, I can quickly filter all the dollar stores by using the condition ‘dollar’ in the name.

Here are the steps to do this:

  • Go to Row Label filter –> Label Filters –> Contains.Filter Data in a Pivot Table in Excel - label contains
  • In the label filter dialog box:
  • Click OK.

You can also use wildcard characters along with the text.

Note that these filters are not additive. So if you search for the term ‘Dollar’, it will give you a list of all the stores that have the word ‘dollar’ in it, but if you then again use this filter to get a list using another term, it will filter based on the new term.

Similarly, you can use other label filters such as begins with, ends with does not contain, etc.

Filter Data Using Search Box

Filtering a list using search box is a lot like the contains option in the label filter.

For example, if you have to filter all the retailers that have the name ‘dollar’ in it, simply type dollar in the search box and it will filter the results.

Here are the steps:

This would instantly filter all the retailers that contain the term ‘dollar’.

Filter Data in a Pivot Table in Excel - search box 3

You can use wildcard characters in the search box. For example, if you want to get the name of all the retailers that start with the alphabet T, use the search string as T* (T followed by an asterisk). Since asterisk represents any number of characters, this means that the name can contain any number of characters after T.

Filter Data in a Pivot Table in Excel - search box 4

Similarly, if you want to get the list of all the retailers that end with the alphabet T, use the search term as *T (asterisk followed by T).Filter Data in a Pivot Table in Excel - search box 5

There are a few important things to know about the search bar:

  • If you filter once with one criterion and then filter again with another, the first criterion is discarded and you get a list of the second criteria. The filtering is not additive.
  • A benefit of using search box is that you can manually deselect some of the results. For example, if you have a huge list of financial companies and you only want to filter banks, you can search for the term ‘bank’. But in case some companies creep in that are not banks, you can simply uncheck it and keep it out.
  • You can not exclude specific results. For example, if you want to exclude only the retailers that contain dollar in it, there is no way to do this using the search box. This can, however, be done using the label filter using the ‘does not contain’ condition.

You May Also Like the Following Pivot Table Tutorials:

  • Creating a Pivot Table in Excel – A Step by Step Tutorial.
  • Preparing Source Data For Pivot Table.
  • Group Numbers in Pivot Table in Excel.
  • Group Dates in Pivot Tables in Excel.
  • Refresh Pivot Table in Excel.
  • Delete a Pivot Table in Excel.
  • How to Add and Use an Excel Pivot Table Calculated Field.
  • Apply Conditional Formatting in a Pivot Table in Excel.
  • Pivot Cache in Excel – What Is It and How to Best Use It?
  • Replace Blank Cells with Zeros in Excel Pivot Tables.
  • Count Distinct Values in Pivot Table

Filters in PivotTables are not similar to filters in the tables or data we use. In PivotTable filters, we have two methods to use. One is by right-clicking on the PivotTable, and we will find the “Filter” option for the PivotTable filter. Another way is using the filter options provided in the PivotTable fields.

How to Filter in a Pivot Table?

The PivotTable is an Excel spreadsheet tool that allows us to summarize, group, and perform mathematical operations like SUM, AVERAGE, COUNT, etc., from the organized data stored in a database. Apart from the mathematical operations, the PivotTable has one of the best features: filtering, which allows us to extract defined results from our data.

Let us look at multiple ways of using a filter in an Excel Pivot table: –

Table of contents
  • How to Filter in a Pivot Table?
    • #1 – Inbuilt filter in the Excel Pivot Table
    • #2 – Create a filter to Values Area of an Excel Pivot table
    • #3 – Display a list of multiple items in a Pivot Table Filter.
    • Using Slicers
    • Create List of cells with Pivot Table Filter Criteria: –
    • List of Comma Separated Values in Excel Pivot Table Filter: –
    • Things to remember about Excel Pivot Table Filter
    • Recommended Articles

#1 – Inbuilt filter in the Excel Pivot Table

  • Let us have the data in one of the worksheets.

Pivot table Filter examplee 1.1

The above data consists of 4 columns: Sr.No, Flat No., Carpet Area, and SBA.

  • Go to the “Insert” tab and select a PivotTable, as shown below.

Pivot table Filter examplee 1.2

  • The “Create a PivotTable” window pops out when you click on the PivotTable.

Pivot table Filter examplee 1.3

In this window, we can select a table or a range to create a PivotTable. Else, we can also use an external data source.

We can also place the PivotTable report in the same worksheet or a new one. For example, we can see this in the above picture.

  • The “PivotTable Fields” is available on the right end of the sheet as below.

Pivot table Filter examplee 1.4

  • We can observe the filter field, where we can drag the fields into filters to create a PivotTable filter. Let us drag the “Flat.No” field into “Filters.” We can see the filter for flat no’s would have been created.

Pivot table Filter examplee 1.5

  • From this, we can filter the flat numbers as per our requirement, which is the normal way of creating the filter in the PivotTable.

Pivot table Filter examplee 1.6

#2 – Create a filter for the Values Area of an Excel Pivot table

Generally, when we take data into value areas, we would not create any filter for those Pivot Table fieldsPivot table calculated fields are formulas with reference to other fields, and calculated values refer to other values within a specific pivot field.read more. However, we can see it below.

Pivot table Filter examplee 2.1

Pivot table Filter examplee 2.2

We can observe that there is no filter option for value areas: Sum of SBA and Sum of Carpet Area. But we can create it, which helps us in various decision-making purposes.

  • Firstly, we must select any cell next to the table and click on the “Filter” in the “Data” tab.

Pivot table Filter examplee 2.3

  • We can see the filter gets in the “Values” area.

Pivot table Filter examplee 2.4

As we got the filters, we can perform different types of operations from value areas, like sorting them from largest to smallest to know top sales/area/anything. Similarly, we can sort from smallest to largest, sorting by color, and even perform number filters like <=,<,>=,>, and many more. So, it plays a major role in decision-making in any organization.

#3 – Display a list of multiple items in a Pivot Table Filter.

The above example taught us about creating a filter in the PivotTable.

Now, let us look at how we display the list differently.

The three most important ways of displaying a list of multiple items in a PivotTable filter are:

  • Using Slicers.
  • Creating a list of cells with filter criteria.
  • List of comma-separated-values.

Using Slicers

  • Let us have a simple PivotTable with columns: Region, Month, Unit no, Function, Industry, Age Category.

example 3.1

  • First, create a PivotTable using the above-given data. Then, select the data, go to the “Insert” tab, select a “PivotTable” option, and create a PivotTable.

example 3.2

example 3.4

  • From this example, we will consider the function of our filter. First, let us check how it can be listed using slicers and varies as per our selection. It is simple: we select any cell inside the PivotTable, go to the “Analyze” tab on the ribbon, and choose the “Insert Slicer.”

example 3.3

  • Then, we need to insert the slide in the slicer of the field in our filter area. So, in this case, we must select the “Function” field in our filter area and then press the “OK” button, which will add a slicer to the sheet.

example 3.5

  • We can see items highlighted in the slicer are those highlighted in our PivotTable filter criteria in the filter drop-down menu.

example 3.6

Now, this is a pretty simple solution that does display the filter criteria. By this, we can easily filter out multiple items and can see the result varying in value areas. From the below example, it is clear that we had selected the functions that are visible in the slicer and can find out the count of age category for different industries (which are row labels that we had dragged into the row label field), which are associated with those functions that are in a slicer. We can change the function per our requirement and observe that the results vary as per the selected items.

However, suppose you have many items on your list here, which is long. In that case, we might not display those items properly. You might have to scroll to see which items are selected, leading us to the next solution: list the filter criteria in cells.

So, “Create List of Cells With Pivot Table Filter Criteria” comes to our rescue.

Create a List of cells with Pivot Table Filter Criteria: –

We will use a connected PivotTable and the above slicer here to connect two PivotTables.

  • Let us create a duplicate copy of the existing PivotTable and paste it into a blank cell.

example 4.1

So, we have a duplicate copy of our PivotTable, and we will modify it slightly to show the “Function” field in the “Rows” area.

To do this, we have to select any cell inside our PivotTable here, go over to the PivotTable field list, and remove industry from the “Rows.” Also, removing the “Count of Age” category from the “Values” area, we will take the “Function” that is in our “Filters” area to the “Rows” area. So, now we can see that we have a list of our filter criteria. If we look over here in our filter drop-down menu, we have the list of items in slicers and function filters.

  • Now, we have a list of our PivotTable filter criteria. It works because both of these PivotTables are connected by the slicer. We can right-click anywhere on the slicer to report connections.

example 4.2

  • PivotTable connections will open up a menu showing that these PivotTables are connected as checkboxes are checked.

example 4.3

It means whenever one change is made in the first PivotTable, it automatically gets reflected in the other.

We can move PivotTables anywhere. For example, we can use it in any financial model and change row labels.

List of Comma Separated Values in Excel Pivot Table Filter: –

So, the third way to display our PivotTable filter criteria is in a single cell with a list of comma-separated values. We can do that with the TEXTJOIN function. We still need the tables we used earlier and just used a formula to create this string of values and separate them with commas.

It is a new formula or function introduced in Excel 2016, called TEXTJOIN(If there is no 2016, you can also use the CONCATENATE function); text joining makes this process much easier.

The TEXTJOIN function provides us with three different arguments:

  • Delimiter – It can be a comma or space.
  • Ignore empty – TRUE or FALSE to ignore blank cells or not.
  • Text – Add or specify a range of cells that contain the values we want to concatenate.

Let us type the TEXTJOIN – (delimiter- which would be “,” in this case, TRUE (as we should ignore empty cells), K: K(like the list of selected items from the filter will be available in this column)to join any value and also ignore any empty value).

Pivot table Filter example 5.1

  • Now, we see getting a list of all our PivotTable filter criteria joined by a string. So it is a comma-separated list of values.

Pivot table Filter example 5.2

  • We could hide the cell if we did not want to show these filter criteria in the formula. Select the cell and go to the “Analyze” options tab. Click on “Field Headers,” and that will hide the cell.

Pivot table Filter example 5.3

Pivot table Filter example 5.4

So, now we have the list of values in their PivotTable filter criteria. If we change the PivotTable filter, it reflects in all the methods. We can use any one of them. But eventually, for a comma-separated solution, a slicer and the list are required. We can hide them if we do not want to display the tables.

Things to remember about Excel Pivot Table Filter

  • The PivotTable filtering is not an additive because when we select one criterion and want to filter again with other criteria, the first one will get discarded.
  • We got a special feature in the PivotTable filter: “Search Box,” which allows us to manually deselect some of the results we do not want. E.g., If we have a huge list and there are blanks too, then to select blank, we can easily choose by searching for blanks in the search box rather than scrolling down till the end.
  • We cannot exclude certain results with a condition in the PivotTable filter, but we can do it by using the “Label Filter.” E.g., If we want to select any product with a certain currency like rupee or dollar, etc., then we can use a label filter – ‘does not contain’ and should give the condition.

You can download this Excel Pivot table filter template from here – Pivot Table Filter Excel Template.

Recommended Articles

This article is a guide to the PivotTable Filter in Excel. Here, we discuss how to filter data in a PivotTable with the help of examples and a downloadable Excel template. You may learn more about Excel from the following articles: –

  • Excel Pivot Table From Multiple SheetsPivot Table is a basic data analysis tool that calculates, summarizes, & analyses the data of a more extensive table. To create a Pivot Table from Multiple Sheets, you can use a few shortcuts & features as per the specified conditions. read more
  • Pivot Table Count Unique
  • How to Delete the Pivot Table?To delete a pivot table in Excel, you must first select it. Then go to the Analyze menu tab under the Design and Analyze menu tabs and select actions. Then, from the Select option’s drop-down option, select Entire Pivot Table to delete it.read more
  • Pivot Chart in ExcelIn Excel, a pivot chart is a built-in feature that allows you to summarize selected rows and columns of data in a spreadsheet. It is a visual representation of a pivot table that helps in the summarization and analysis of datasets, patterns, and trends.read more

See all How-To Articles

This tutorial demonstrates how to filter pivot table values in Excel and Google Sheets.

pivotfilter intro

Built-in Pivot Table Filter

When you create a pivot table, the column headers from the data become fields for the pivot table. Filtering in a pivot table is similar to applying any other filter in Excel.

  1. In the PivotTable Fields window, drag fields down to one of four areas to build the table. One area is for Filters.

pivottable filters area

  1. You can then filter your pivot table by the field(s) from the Filters area (here, Salesperson). Find the filter field(s) at the top of your pivot table, above column headings and a blank row. Click the arrow for the filter field and choose the item to filter on (e.g., Collins). Then click OK.

pivotfilters select filter

Now the pivot table shows all the information set up in the PivotTable Fields window, but only for rows where the Salesperson is Collins.

pivotfilters show one filter

  1. To clear the filter, click the filter drop down on the right side of the cell. Choose (All) then click OK.

pivotfilter filter clear

  1. If you want to filter on multiple items, tick Select Multiple Items. Notice how each item in the drop down now has a checkbox next to it.

pivotfilters filters multiple

  1. Uncheck the (All) box and tick the items you wish to filter on (e.g., Chan and Collins). Click OK.

pivotfilters select multiple

The cell with the filter drop down (here, B1) shows that multiple items are included, but you cannot see which items without clicking the arrow on the right.

pivotfilters show multiple

  1. To clear the filter once again, choose (All) from the filter drop down and click OK.

Filter by Row / Column

You can also filter by the row and column labels.

  1. Click the filter drop down to the right of the Column Labels heading. Remove the checkmark from (Select All), and then tick the item you wish to filter on.

pivotfilter column filter

  1. Click OK to apply the filter.

pivotfilter column filtered

Filter Row Labels in the same way.

pivotfilter row filter

Filter Values by Date

If you have dates in your pivot table, you can filter by these dates. This can be done in the Filters, Rows, and/or Columns areas.

Filter by Year or Quarter

When a date is added to the Rows or Columns area, it is automatically broken down into three groups – Years, Quarters, and the actual value of the date field itself. All three fields are added to the relevant area.

pivotfilter date field

You can then click the Row Labels filter drop down and choose the specific field to filter on (e.g., Years) in the Select field drop down.

pivotfilter date select year

Also try changing the filter field to filter by quarters instead of years.

pivotfilter date select quarter

Filter by Month

To filter by month, choose the original field (e.g., Order Date) from the drop down instead of the automatically generated years or quarters.

pivotfilter date months

Other Date Filters

You can also choose Date Filters from the Row Labels drop down, and then choose the criteria you need – for example, This Year.

pivotfilter date select this year

This immediately restricts the data shown to this year only.

pivotfilter date filtered

Date Range

You can also be more specific and choose the start and end dates to filter on.

  1. From the Row Labels drop down, go to Date Filters > Between…

pivotfilter date between

  1. Select the start and end dates and click OK.

pivotfilter date between dates

Notice a small icon in the Row Labels drop down (on the right side of the cell) indicating that a filter is applied.

pivotfilter date filter graphic

  1. To get rid of the filter, click Clear Filter from “Years” in the drop down.

pivotfilter date filter clear

Add Additional Filters

Individual columns of a pivot table do not have filters automatically in place.

  1. To create a filter on these values, select the cell to the right of the pivot table (here, J5), and then in the Ribbon, go to Home > Editing > Filter.

pivotfilter filter add filter

  1. This adds a filter to each column label. You can then filter on each value. For example, you can tick any of the individual values in the Grand Total list, or you can use a Number Filter, such as one that includes only values Greater Than a certain amount.

pivotfilter values

Tip: Try using some shortcuts when you’re working with pivot tables.

Filter Pivot Table in Google Sheets

Pivot tables, especially the window where the table is built and structured, look a little different in Google Sheets, but the methods for filtering are similar.

  1. In the Pivot table editor, click Add.

pivotfilter gs filter add

  1. Choose the field you wish to filter on (e.g., Region).

pivotfilter filter gs select field

  1. Under Filter by values, click Clear. Then individually tick the values to include in the filter.

pivot filter gs select values

  1. Click OK to apply the filter.

pivotfilter filter gs pivot

  1. To clear the filter, click the X to the right of the filtered field.

pivotfilter gs clear filter

Filter by Condition

  1. Now, add a filter for the Sale Date to the pivot table.

pivotfilter gas add date filter

  1. Click Filter by condition.

pivot gs filter by condition

  1. Choose Date is after from the drop down.

pivotfilter gs date after

  1. Then, click exact date from the next drop down.

pivotfilter gs exact date

  1. In the bottom box, type in the date you need. Click OK.

pivotfilter gs apply date

The pivot table is filtered accordingly.

pivotfilter filter gs filtered by date

Instead of looking at all the data in a pivot table, you can use filters to narrow your focus. See how to apply one filter, or apply multiple filters on a pivot field, without clearing the others.

Report Filters

The most noticeable ones are the Report Filters at the top of the pivot table. You can use those to select one item, or multiple items, to show in the results.

In the screen shot below, the Report Filter has been set to show only New York City. In the Row area, the Product and OrderMth fields have been added, and Total Price is in the Values area.

multiplefilterspivot02

Filter the Row Fields

You can use filters in the Row and Column fields too. There are 3 types of field filters:

  • Label
  • Value
  • Manual

We’ll see how they work individually, and then how they can be used together.

Apply a Label Filter

In this example, the pivot table has data from 2013-01 to 2013-12. To show only the last six months of the year, you can use a Label Filter on the Order month field.

  • Click the arrow in the OrderMth heading
  • Point to Label Filters
  • Click Greater Than
  • In the Label Filter window, type 2013-06 in the second box, and click OK

multiplefilterspivot03

Now, only the data from July to December is visible.

multiplefilterspivot04

Apply a Value Filter

Next, we’ll apply a value filter on the OrderMth field, to show the top 2 months for each product. To do this, we’ll apply a Top 10 filter on the field.

  • Click the arrow in the OrderMth heading
  • Point to Value Filters
  • Click Top 10
  • In the Top 10 Filter window, type 2 in the middle box, and click OK

multiplefilterspivot05

The pivot table now shows the 2 months with the highest sales, but the Label filter was removed. In the screen shot below, month 2013-05 is included in the Bran results. For Chocolate Chip, both months are in the first half of the year.

multiplefilterspivot06

So, when you add a different type of row filter, the first filter is removed.

Add a Manual Filter

Finally, we’ll try a Manual Filter. For this, you add or remove check marks in the list of pivot items for the field.

multiplefilterspivot07

Again, as soon as a new filter is applied, the old filter is removed. Now only the sales from the first 3 months are shown.

multiplefilterspivot08

Change the Pivot Table Filter Options

By default, a pivot table is set up to allow only one filter per field, as we saw in the examples above. However, if you want to use more than one filter per field, you can change one of the Pivot Table options.

  • Right-click any cell in the pivot table, and click PivotTable Options.
  • Click the Totals & Filters tab
  • Under Filters, add a check mark to ‘Allow multiple filters per field.’
  • Click OK

multiplefilterspivot09

Now you can apply both a Label filter and a Value filter to the OrderMth field, and both will be retained. In the screen shot below, both the Label filter (Greater Than 2013-06) and the Value filter (Top 2) have been applied, and both are in effect, as you can see in the popup message.

NOTE: You’re limited to one of each filter type per pivot field.

multiplefilterspivot10

Use PivotPower Premium Add-In

If you’ve bought a copy of my PivotPower Premium add-in (no longer sold), you can quickly turn the “Allow Multiple Filters” setting on and off with a command on the toolbar.

  • On the PivotPower tab, in the Filters group, click Filters
  • Click Allow Multiple Filters – On, or Allow Multiple Filters – Off

multiplefilterspivotpower

It’s also one of the Default Settings that you can store, so it will be automatically set when you use the Apply Defaults command.

multiplefilterspivotpower2

Watch the Pivot Table Filters Video Tutorial

To see the steps to apply multiple filters on a pivot field, watch this short Excel video tutorial.

Your browser can’t show this frame. Here is a link to the page

____________

Like this post? Please share to your friends:
  • Filter numbers in excel
  • Filter in excel with formula
  • Filter function excel 2016
  • Filter formula for excel
  • Filter for excel file