How to Add a Filter to a View in Tableau
Filters are one of the most powerful features in Tableau, turning a sea of data into a focused, insightful view. Instead of showing every single data point at once, filters let you and your audience slice and dice the information to answer specific questions. This guide will walk you through exactly how to add and use filters in your Tableau worksheets and dashboards, from the basics to more advanced options.
Why Filters Are Your Best Friend in Tableau
Before jumping into the "how," let's quickly touch on the "why." Imagine you have a worksheet showing sales data for every product in every region for the past five years. While that data is all there, it’s not particularly useful. It's too much noise.
Filters help you reduce that noise. You can use them to:
- Focus on a specific time period: Show only sales from the last quarter.
- Segment your data: View performance for a single product category or sales region.
- Remove irrelevant data: Exclude test orders or internal accounts.
- Create interactive dashboards: Allow your end-users to change the view themselves to explore the data.
Essentially, filters are the tool you use to have a conversation with your data, asking it questions and drilling down to find the answers you need.
How to Add a Basic Filter: The Drag-and-Drop Method
The simplest way to add a filter is by dragging a field directly onto the Filters shelf. Let's walk through an example using the sample "Superstore" dataset that comes with Tableau.
Imagine we have a simple bar chart showing Sales by Sub-Category.
- Identify the field you want to filter by. In our example, we want to let users view sales by a specific Region. The field for this is called "Region."
- Drag the field to the Filters shelf. In the Data pane on the left, find the Region dimension. Click and drag it onto the "Filters" card, which is located just above the Marks card.
- Choose your initial filter settings. As soon as you drop the field, a dialog box will appear. Since "Region" is a dimension with text values (Central, East, South, West), Tableau will show you a list of these values with checkboxes.
- Select values to include. You can check which regions you want to include in your initial view. For now, let’s click the "All" button to include everything by default.
- Click OK. You'll now see a "pill" for Region on your Filters shelf. The chart won't look any different yet, because we've included all the values. The next step is making it interactive.
Making Your Filters Interactive for Users
A static filter is useful, but the real power comes from allowing users on a dashboard to change the filter themselves. This is incredibly easy to set up.
- Right-click the Region pill on your Filters shelf.
- Select "Show Filter."
That's it! A filter card will now appear on the right-hand side of your view, showing the checklist of regions. You can now check and uncheck boxes, and the bar chart will update in real-time. This interactive card will carry over when you add this worksheet to a dashboard.
Customizing Your Interactive Filter
Tableau gives you options for how this interactive filter looks and behaves. On the interactive filter card that just appeared, click the small dropdown arrow in its top-right corner. You'll see several display options:
- Single Value (List): A list of options with radio buttons, allowing the user to select only one at a time.
- Single Value (Dropdown): A compact dropdown menu for selecting one value. Great for saving space on a dashboard.
- Multiple Values (List): The default option with checkboxes, letting users select any combination of values.
- Multiple Values (Dropdown): A dropdown that allows for multiple selections.
- Wildcard Match: A text box where users can type to find matching values (e.g., typing "East" would filter to just that region).
Choose the option that best fits your dashboard design and how you want your users to interact with the data.
Understanding the Different Types of Tableau Filters
Tableau offers several types of filters that work in different ways depending on the kind of data you're using. The main ones you’ll use are Dimension, Measure, and Date filters.
1. Dimension Filters (Filtering by Categories)
You’ve already used a Dimension filter - our Region example. These filters are used for discrete, categorical data (usually text or whole numbers that represent categories). They group data into distinct buckets.
When you drag a blue dimension pill to the Filters shelf, you'll see a dialogue box with four tabs:
- General: This is the list of checkboxes you saw earlier. You can select specific values to include or exclude.
- Wildcard: This lets you filter based on pattern matching. For example, you can filter for all product names that "Contain" the word "Chair."
- Condition: This allows you to filter the dimension based on a measure. For example, you could show only Regions where the Sum of Sales is greater than $500,000.
- Top: This lets you filter to the Top N or Bottom N items based on a measure. For instance, you can show the "Top 10 Products by Profit."
2. Measure Filters (Filtering by Numbers)
Measure filters are used for continuous, numerical data (like Sales, Profit, or Quantity). They work by defining a range of acceptable values.
Let's say you want to see only the Sub-Categories where the total sales were over $200,000. Here's how:
- Drag the green Sales measure pill onto the Filters shelf.
- A "Filter Field" box will appear, asking how you want to aggregate the measure (e.g., Sum, Average, Median). For this, we’ll stick with Sum. Click Next.
- Now you’ll see the filter options for this measure. You can define a range of values, or use "At least," "At most," or "Special" (to handle null values).
- Select "At least" and enter 200000.
- Click OK. Your view will automatically update to show only the Sub-Categories that met that sales threshold.
If you choose to "Show Filter" for a measure, it often appears as a handy slider that users can adjust.
3. Date Filters (Filtering by Time)
Dates are a special and very common type of data to filter. When you drag a date field (like Order Date) to the Filters shelf, Tableau gives you a unique set of options:
- Relative Date: This is the most dynamic option. You can set up filters like "Previous 30 days," "This year," or "Last 3 months." This is fantastic for dashboards that always need to show the most recent data, because the filter automatically updates as time passes.
- Range of Dates: This creates a start and end date selector. Users can select a specific period to analyze. This shows up as a simple dual-ended slider when made interactive.
- Discrete Dates: This treats each part of the date as a separate category (e.g., a list of years like 2021, 2022, 2023, or a list of months).
Relative date filters are extremely useful for business dashboards where you might want a default view of "This Quarter" or "Last 7 Days."
Advanced Filter Concepts: Context Filters
As you build more complex views, you might run into situations where your filters aren't interacting the way you expect. A "Top 10" filter, for example, is calculated before a standard dimension filter.
Let's say you build a view to show the Top 10 selling products. Then, you add a regular dimension filter for the "Technology" Category. You might expect to see the Top 10 products within the Technology category. Instead, you'll see whichever of the overall Top 10 products also happen to be in the Technology category, which might only be three or four products.
To fix this, you use a Context Filter. A context filter is a priority filter that runs before any other standard filter in the view.
To make your "Category" filter a context filter:
- Right-click the Category pill on the Filters shelf.
- Select "Add to Context."
The pill will turn gray, indicating it's now a context filter. Now, Tableau will first filter the data to only the Technology category, and then it will apply the Top 10 filter to find the top products within that context. Think of it as creating a temporary, smaller dataset first, then running all other filters on that smaller set.
Final Thoughts
Mastering filters is the key to unlocking actionable insights in Tableau. By learning how to apply dimension, measure, and date filters, and by making them interactive, you can transform a static chart into a dynamic and exploratory tool. When you start building more complex views, understanding concepts like context filters will give you precise control over your analysis.
Learning how to configure menus, drag and drop fields, and understand the order of operations in a tool like Tableau is an incredibly valuable skill. We built Graphed to simplify this entire workflow. Instead of clicking through menus to build a report, you can just ask in plain English, "Show me my top 10 products by sales in the last quarter," and we instantly generate the visualization using live data from your connected sources. Our goal is to give you back the time you spend building reports so you can focus on making decisions with your data, not just preparing it.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.