Was this page helpful?
Yes No
Have a comment? Please leave it here. Thanks for your feedback!
All Tableau Help > Tableau Desktop and Web Authoring Help > 
Applies to: Tableau Desktop, Tableau Online, Tableau Server

Filter Data from Your Views

Filtering is an essential part of analyzing data. This article describes the many ways you can filter data from your view. It also describes how you can display interactive filters in the view, and format filters in the view.

Watch a Video: To see related concepts demonstrated in Tableau, watch these free training videos: Ways to Filter (2 minutes), Where Tableau Filters (4 minutes), Using the Filter Shelf (7 minutes), Interactive Filters (4 minutes), Additional filtering topics (7 minutes), and Filtering for Top Across Panes (6 minutes). Use your tableau.com account to sign in.

In this article

Filtering Order of Operations

Select to keep or exclude data points in your view

Select headers to filter data

Drag dimensions, measures, and date fields to the Filters shelf : Categorical data | Quantitative data | Dates | Table Calculations

Display interactive filters in the view

Set options for filter card interaction and appearance: Filter card modes | Customize filter cards

Filtering Order of Operations

Before you begin filtering data in Tableau, it's important to understand the order in which Tableau executes filters in your workbook.

Tableau performs actions on your view in a very specific order; this is called the Order of Operations. Filters are executed in the following order:

  1. Extract filters

  2. Data source filters

  3. Context filters

  4. Filters on dimensions (whether on the Filters shelf or in filter cards in the view)

  5. Filters on measures (whether on the Filters shelf or in filter cards in the view)

To learn more, see Tableau's Order of Operations.

Note: When you drag a discrete dimension to the Filters shelf, the Filter dialog box offers four tabs for filtering: General, Wildcard, Condition, and Top. The settings on each of these tabs are additive starting with the General tab; what you set on each tab will affect the filter results on each tab to the right. For details on the Filter dialog box, see Drag dimensions, measures, and date fields to the Filters shelf and Filter categorical data (dimensions).

Back to top


Select to keep or exclude data points in your view

You can filter individual data points (marks), or a selection of data points from your view. For example, if you have a scatter plot with outliers, you can exclude them from the view so you can better focus on the rest of the data.

To filter marks from the view, select a single mark (data point) or click and drag in the view to select several marks. On the tooltip that appears, you can:

Note: These filtering options are not available if a Wildcard Match filter is already specified for the same field. See Drag dimensions, measures, and date fields to the Filters shelf to learn more about Wildcard Match filters.

Back to top


Select headers to filter data

You can also select headers to filter them from your view.

To filter entire rows or columns of data from your view, select the header in the view. On the tooltip that appears, select to Exclude or Keep Only the selected data.

When you select a table header that is part of a hierarchy, all of the next level headers are also selected. For example, the view shown below consists of two unrelated dimensions placed on the Columns shelf, and two levels of the same hierarchy placed on the Rows shelf.

The selected row headers include the Furniture member of the Category dimension, and the Binders and Labels members of the Sub-category dimension. When Furniture is selected, all members from the next (inner) level in the hierarchy are automatically selected. In this case, that means the Bookcases, Chairs, Furnishings, and Tables members.

Back to top


Drag dimensions, measures, and date fields to the Filters shelf

Another way to create a filter is to drag a field directly from the Data pane to the Filters shelf.

In Tableau Desktop, when you add a field to the Filters shelf, the Filter dialog box opens so you can define the filter. The Filter dialog box differs depending on whether you are filtering categorical data (dimensions), quantitative data (measures), or date fields.

In web authoring, when you add a field to the Filters shelf, an interactive filter appears in the view.

Filter categorical data (dimensions)

Dimensions contain discrete categorical data, so filtering this type of field generally involves selecting the values to include or exclude.

In Tableau Desktop

When you drag a dimension from the Data pane to the Filters shelf in Tableau Desktop, the following Filter dialog box appears:

There are four tabs in the dialog box:

Important Note: Each tab adds additional definitions to your filter. For example, you can select to exclude values under the General tab, and also add limits under the Top tab. Selections and configurations from both tabs are applied to your filter.

At any time, you can see the definitions of your filter under Summary on the General tab.

In web authoring

When you drag a dimension from the Data pane to the Filters shelf in web authoring, an interactive filter appears in the view.

You can then select the items you want to include or exclude in the view.

Back to top


Filter quantitative data (measures)

Measures contain quantitative data, so filtering this type of field generally involves selecting a range of values that you want to include.

In Tableau Desktop

When you drag a measure from the Data pane to the Filters shelf in Tableau Desktop, the following dialog box appears:

Select how you want to aggregate the field, and then click Next.

In the subsequent dialog box, you're given the option to create four types of quantitative filters:

Range of Values: Select the Range of Values option to specify the minimum and maximum values of the range to include in the view. The values you specify are included in the range.

At Least: Select the At Least option to include all values that are greater than or equal to a specified minimum value. This type of filter is useful when the data changes often so specifying an upper limit may not be possible.

At Most: Select the At Most option to include all values that are less than or equal to a specified maximum value. This type of filter is useful when the data changes often so specifying a lower limit may not be possible.

Special (Tableau Desktop only): Select the Special option to filter on Null values. Include only Null values, Non-null values, or All Values.

Note: If you have a large data source, filtering measures can lead to a significant degradation in performance. It is sometimes much more efficient to filter by creating a set containing the measure and then apply a filter to the set. For more information about creating sets, see Create Sets.

In web authoring

When you drag a measure from the Data pane, to the Filters shelf in web authoring, the field is automatically aggregated as a SUM and an interactive filter appears in the view.

To change the aggregation of the filter:

To change the type of quantitative filter in the view:

Back to top


Filter dates

In Tableau Desktop

When you drag a date field from the Data pane to the Filters shelf in Tableau Desktop, the following Filter Field dialog box appears:

You can select whether you want to filter on a relative date; filter between a range of dates; or select discrete dates or individual dates to filter from the view.

In web authoring

When you drag a date field from the Data pane to the Filters shelf in web authoring, a date range filter appears in the view.

To change the type of filter, click the filter card drop-down and select from the following:


Filter table calculations

To create a table calculation filter, create a calculated field, and then place that field on the Filters shelf.

Filters based on table calculations do not filter out underlying data in the data set, because table calculation filters are applied last in the order of operations. This means Tableau evaluates any table calculations in the view first, and then applies table calculation filters on the results in the current view.

Apply table calculation filter to totals

When you show totals in a view and you want a table calculation filter to apply to the totals, you can select Apply to totals in the drop-down menu for that filter (on the Filters shelf). This option lets you decide when a table calculation filter should be applied to totals.

  

This options is available when you show totals in the view, and you add a table calculation filter to the view. Select Apply to totals to apply the table calculation filter to all of the results in the table, including the totals.

Back to top


Display interactive filters in the view

When an interactive filter is shown, you can quickly include or exclude data in the view.

Note: In web authoring, interactive filters are automatically added to the view when you drag a field to the Filters shelf.

To show a filter in the view:

  1. In the view, click the field drop-down menu and select Show Filter.
  2. The field is automatically added to the Filters shelf (if it is not already being filtered), and a filter card appears in the view. Interact with the card to filter your data.

     

Note: In Tableau Desktop, you can add an interactive filter to the view for a field that is not currently used in the view. To do so, In the Data pane, click the field drop-down menu, and then select Show Filter.

Back to top


Set options for filter card interaction and appearance

After you show a filter, there are many different options that let you control how the filter works and appears. You can access these options by clicking the drop-down menu in the upper right corner of the filter card in the view.

Some options are available for all types of filters, and others depend on whether you’re filtering a categorical field (dimension) or a quantitative field (measure).

You can customize how filters appear in the view, in dashboards, or when published to Tableau Server or Tableau Online.

Here are some of the general filter card options:

Back to top


Filter card modes

You can control the appearance and interaction of your filter card in the view by selecting a filter card mode.

To select a filter card mode, in the view, click the drop-down menu on the filter card and then select a mode from the list.

The types of filter card modes you see in the list of options depend on whether your filter is on a dimension or a measure. Below you can find brief descriptions of the types of filter card modes available for dimensions and measures.

For dimensions, you can choose from the following filter modes:

For measures, you can choose from the following filter modes:

Note: When you expose a filter for Measure Values or Measure Names as a single value list, selecting All will automatically convert the filter to a multiple values list. For information on Measure Values and Measure Names, see Measure Values and Measure Names.

Back to top


Customize filter cards

In addition to the general filter options and the filter modes, you control how your filter appears in the worksheet, on dashboards, or when published to the web even further in Tableau Desktop.

To customize filters, click the filter card drop-down menu and select Customize.

You can select from the following options:

 

See Also

Back to top