Skip main navigation

Filtering data

Filtering data

After adjusting the look and feel of a visualisation, you may want to consider adding interactive elements to your visualisation, including adding filters. Filtering is a method of reducing as well as analysing data.

Filtering can occur:

  • at the data source view, to reduce the data you work with

  • at the sheet view, for analysis.

Filters help viewers to focus on the information that’s most valuable to them by reducing the amount of data displayed on a visualisation. For example, a filter might allow you to select a state, so you can see the stores from a specific state rather than the entire country.

Let’s look at some ways to filter your visualisations in Tableau.

Select to keep or exclude data points

You can filter individual data points (also known as marks) or a selection of data points. For example, you can filter a scatter plot to exclude outliers.

To filter marks from the view, select the data you want to keep or exclude.

Keep Only keeps the data you selected and filters out the rest.

GIF of Tableau shows “Keep Only”. On the plot chart the cursor drags and selects a group of points on the chart. When this is done a pop up box appears and there are options to “Keep Only” and "Exclude” the cursor clicks “Keep Only”. "When the cursor clicks "Keep only" all the points on the map that were not selected disappear"

Exclude excludes the data you selected and keeps the data that wasn’t selected.

Select headers to filter data

You can select headers to filter entire rows or columns from your view. These filters are applied to the sheet and apply to the visualisations that are built from it.

Drag dimensions, measures, or date fields to the filters shelf

You can create a filter by dragging a field from the data pane to the filters shelf. This opens the filters dialogue box, which allows you to make filter selections. The dialogue options are based on the type of data you’re filtering. In this case, we are filtering the data by customer names.

Filtering dimensions (categorical data)

Filtering categorical data usually involves specifying values to include or exclude. For example, you might filter a country field to display Australia.

When you drag a dimension into the filters shelf, a dialogue box appears to prompt you to specify your filter criteria.

GIF of Tableau shows “Filter Categorical”. The cursor selects “State” from the location pane and drags it into the “Filters” pane. It then prompts a pop a window where you can see “General”, “Wildcard”, “Condition” and “Top”. The cursor selects “General” where you can then choose “Select from List”, “Custom value List”, or “Use All”. The cursor selects “Select from List” and clicks “Ok”.

There are four tabs in the dialogue box.

  1. General: Specify the values you want to include or exclude.

  2. Wildcard: Specify a pattern to filter on. For example, filter an email address field for only ‘@hotmail.com’ domains.

  3. Condition: Define rules to filter on. For example, filter Product Price to display products that are equal to or above $100.

  4. Top: Define a formula that computes data to filter on. For example, filter on the Top 10 customers by Account $.

Filtering measures (quantitative data)

Quantitative or numerical data is typically filtered by range. For example, you could filter the Sales field in the CustomerRank sheet to display those with sales between $20,000 and $40,000.

When you drag a measure into the filters shelf, you’ll see this dialogue box.

Screenshot of Tableau shows “Filters Measure Dialog Specs”. The pop up box for “Filter (Avg. Sales) has a sub heading that reads: How do you want to filter on (sales)? From there you can select “All Values”, “Sum”, “Average”, Median”, “Count”, “Count(Distinct)”, “Minimum”, “Maximum”, “Standard deviation”, “Standard deviation (Population)”, Variance”, “Variance(population), and “Attribute”.

When you’ve decided how you want to filter the field, click Next.

You’ll be prompted to select from three types of filters:

  1. Range of values: Displays the range within min and max values.

  2. At least: Displays all values greater than or equal to the value specified.

  3. At most: Displays all values less than or equal to the value specified.

Filtering dates

Dates are typically filtered within a range (e.g. filtering for all sales in a calendar or financial year).

When you drag a date field to the filters shelf, you’ll see this dialogue box.

Screenshot of Tableau shows “Filters measure dialog specs”. The “Filter Field” heading reads: How do you want to filter on [Ship Date]? The options given are: “Relative Date”, “Range of Dates”, “Years”, “Quarters”, “Months”, “Days”, “Week numbers”, “Weekdays” “Month, Year”, “Month, Day, Year”, “Individual Dates”, “Count”, “Count (Distinct)”, Minimum”, “Maximum” and “Attribute”.

As with the other filter types, when you click Next, you’ll be prompted to select from several options to specify how you want to filter the date field (e.g. Relative dates, Range of dates, and Discrete dates).

Displaying interactive filters in the view

When you’ve created a filter, you can add it to the view so you can include or exclude data quickly.

Are you having difficulty with filters?

If you follow the example and have problems, don’t panic. Ask questions or share and discuss suggestions and solutions with other learners in the Comments section.

This article is from the free online

Financial Analysis for Business Decisions: How to Use Tableau and Financial Modelling

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now