How to Add a Date Filter in Tableau

Cody Schneider8 min read

Filtering your Tableau dashboard by date is one of the most useful skills you can learn, turning a static chart into an interactive and dynamic analysis tool. This guide will walk you through exactly how to add different types of date filters in Tableau, from simple ranges to more advanced options that will make your dashboards far more powerful for your end-users.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Getting Started: Adding a Basic Date Filter

At its core, adding a filter in Tableau involves dragging a data field onto the "Filters" shelf. The process is straightforward, but Tableau gives you a few powerful options right from the start.

Let's use a common example: filtering a sales dashboard by Order Date.

  1. Locate the date field you want to filter by in your "Data" pane on the left side of the screen. In our case, this will be 'Order Date'.
  2. Click and drag the 'Order Date' pill onto the "Filters" shelf.
  3. Once you drop the pill, a "Filter Field" window will pop up. This is where you choose the type of date filter you want.

This pop-up menu is your first major decision point. It asks how you want to filter the dates. Let’s look at what these options mean:

  • Relative dates: Filters based on the current date (e.g., "last 7 days," "previous month," "year to date"). This is perfect for dashboards that need to stay current automatically.
  • Range of dates: Gives you a start and end date, often controlled by a slider. This is the most common and versatile option, letting users select any period they want.
  • Individual dates: Lets you choose specific years, quarters, months, or days from a list. It's great for comparing specific, non-continuous periods.
  • Start date / End date: Filters for all dates after a specified start date or before a specified end date.

For now, select "Range of dates" and click "Next." A new window will appear showing a slider for your date range. Just click "OK" without changing anything. You've just created your first date filter!

A Deeper Look at Tableau's Date Filter Types

While a simple date range is useful, mastering the different filter types is what separates a basic dashboard from a great one. Let's explore the most common options in more detail.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

1. The Range of Dates Filter (Slider)

This is the most popular type of date filter. It's intuitive for users and provides a lot of flexibility.

How to Set It Up:

After dragging your date field to the Filters shelf and selecting "Range of Dates," you'll see a simple range. To make this interactive on your dashboard:

  1. Right-click on your date filter pill in the Filters shelf.
  2. Select "Show Filter."

A date range slider will appear on the right side of your worksheet. Users can now drag the handles to narrow the time frame, or click on the dates to type a specific start or end date directly into a calendar view. This is ideal for exploratory analysis where a user might want to analyze performance over a specific product launch period or an ad campaign.

2. The Relative Date Filter (Dynamic Filtering)

Relative date filters are incredibly powerful because they update automatically. A filter set to "Previous 3 months" will always show the last three full months relative to today’s date. You never have to manually update it.

How to Set It Up:

  1. Drag your date field to the Filters shelf.
  2. In the "Filter Field" pop-up, choose "Relative Date" and click "Next."
  3. A new configuration menu will appear. Here you can choose from various preset time frames:
  4. For example, you could set it to "Months" and then select "Last 3 months." This will automatically filter your view to the last three complete months.

This type of filter is fantastic for operational dashboards, such as a weekly marketing performance report or a daily sales tracker, where the most recent data is what matters most.

3. The Discrete Date Filter (Specific Dates)

Sometimes you don't need a range, you need to select specific years, months, or days. This is where discrete date filters come in. You might use this to compare sales in December 2022 vs. December 2023.

The key here is the difference between green (Continuous) and blue (Discrete) pills in Tableau.

How to Set It Up:

  1. Drag your date field onto the Filters shelf.
  2. When the "Filter Field" dialog opens, choose one of the options under the discrete section, such as "Years," and click "Next."
  3. A window will appear with a list of all years present in your data. You can select one or more. Click "OK."
  4. Now, right-click the filter on the Filters shelf and click "Show Filter" to make it interactive. By default, it will show as a list of checkboxes.

Pro Tip: You can change how a date is treated by right-clicking the date pill (either in the Data pane or already on a shelf). The first set of options in the context menu (Year, Quarter, Month) are discrete parts, while the second set below it (YEAR, QUARTER, MONTH) are continuous.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Customizing Your Filter for a Better User Experience

Adding a filter is only half the battle. Making it easy and intuitive to use is what makes a dashboard truly valuable. Once you’ve selected "Show Filter," you can customize its appearance and functionality.

Changing the Filter Display Type

The default filter might be a slider or a list of checkboxes, but Tableau offers many more options. Once the filter is visible on your dashboard, click the small dropdown arrow at the top right of the filter card. You'll see a list of choices.

For a continuous date filter (like a range), your options include:

  • Slider: The default, easy-to-use range selector.
  • Relative to now / Relative to a specific date: Lets the user switch to a relative date view on the fly.

For a discrete date filter (like individual months), you have more options:

  • Single Value (List): A radio button list where you can only select one month at a time.
  • Single Value (Dropdown): A dropdown menu for picking one month. Saves a lot of screen space.
  • Multiple Values (List): The default checkbox list, allowing users to select multiple months.
  • Multiple Values (Dropdown): A compact dropdown with checkboxes. Ideal when you have many years or months to choose from.
  • Wildcard Match: Lets users type text to find a match (e.g., typing "Dec" to find options with December).

Choosing the right display type is critical for usability. If your users only ever look at one month at a time, use a "Single Value (Dropdown)" to save space and prevent confusion. If they need to compare several periods, a "Multiple Values (Dropdown)" is a great choice.

Advanced Techniques for Date Filters

Once you’ve mastered the basics, you can apply these filters more intelligently to create a seamless user experience across a complex dashboard.

Applying a Filter to Multiple Worksheets

Imagine you have a dashboard with three different charts: a bar chart of sales by region, a map showing customer locations, and a line chart of sales over time. You want one single date filter to control all three charts simultaneously.

  1. Add a date filter to one of the worksheets and get it set up how you like it.
  2. Make sure it’s displayed on your final dashboard.
  3. Click the dropdown menu on the filter card and go to "Apply to Worksheets."
  4. You have a few choices:

Unifying your filters is a crucial step for building professional, intuitive dashboards.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Creating a "Year to Date" (YTD) Filter with a Calculation

While the relative date filter has a "Year to Date" option, you may want more direct control. You can achieve this by creating a simple calculated field that returns either "True" or "False." This can be used as a simple on/off button for your dashboard viewers.

  1. Open the "Analysis" menu at the top, and click "Create Calculated Field."
  2. Name your calculation something clear, like "Is YTD?".
  3. Enter the following formula:

[Order Date] <= TODAY() AND DATETRUNC('year', [Order Date]) = DATETRUNC('year', TODAY())

Formula Breakdown:

  • [Order Date] <= TODAY() ensures you don’t include any dates in the future.
  • DATETRUNC('year', [Order Date]) truncates your Order Date to the beginning of its year (e.g., '2023-08-15' becomes '2023-01-01').
  • DATETRUNC('year', TODAY()) truncates today's date to the beginning of the current year (e.g., it will be '2024-01-01' for all of 2024).
  • The formula essentially says: "Check if the record's date is in the current year and is on or before today."
  1. Click "OK." You now have a T/F field in your data pane.
  2. Drag your new calculated field onto the Filters shelf and select "True."

Now your entire worksheet is filtered for year-to-date data. You can show this filter and it acts as a simple toggle, which is perfect for users who just want to quickly switch between all time and YTD views.

Final Thoughts

Adding and customizing date filters transforms your Tableau dashboard from a static image into a dynamic, interactive tool for exploration. By understanding the difference between relative, range, and discrete filters - and learning how to customize their appearance and scope - you can empower anyone to find insights specific to the timeframes that matter most to them.

Setting up dashboards and reports in powerful tools like Tableau can often feel like a technical exercise of clicks, drags, and calculated fields. At Graphed, we've simplified this entire process. You can connect your data sources in seconds and use simple, natural language to ask questions like, "show me a dashboard comparing sales vs ad spend for the last year" and get a live, interactive dashboard built for you instantly. With systems like Graphed, you can go straight from question to insight, without all the steps in between.

Related Articles