How to Create Date Range in Tableau

Cody Schneider7 min read

Filtering your data by a specific date range is one of the most common and essential tasks you'll perform in Tableau. Whether you want to see sales for the last quarter, website traffic from a specific marketing campaign, or inventory levels from the last 7 days, controlling the time frame is fundamental to your analysis. This guide will walk you through the most effective methods for creating and using date range filters in Tableau, from simple presets to fully customizable user-controlled parameters.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Before You Begin: Understand How Tableau Sees Dates

In Tableau, dates can be either Discrete or Continuous. This is a small distinction that has a big impact on how your filters and visualizations behave.

  • Discrete Dates (Blue Pill): These treat dates as distinct, individual units. Think of them as categories. For example, "Q1 2023," "Q2 2023," and "Q3 2023" are treated as separate items. On the shelf, they are blue.
  • Continuous Dates (Green Pill): These treat dates as part of an unbroken timeline. This allows Tableau to see the flow from one point in time to the next. On the shelf, they are green.

For most date range filters, you will want your date field to be continuous, so make sure your date dimension has the green calendar icon next to it. You can right-click the date field and select "Continuous" if it's not already.

Method 1: The Quick and Easy Relative Date Filter

The simplest way to filter a date range is with Tableau's built-in Relative Date filter. This is perfect for dashboards that always need to show a rolling time frame, like "This Week," "Last 30 Days," or "Previous Quarter."

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step-by-Step Instructions:

  1. Drag your date field (e.g., Order Date) onto the Filters card.
  2. A "Filter Field" dialog box will appear. Select "Relative date" and click "Next".
  3. You will now see the Relative Date filter configuration window. Here, you have several anchor points:
  4. Choose a unit (Years, Quarters, Months, Weeks, or Days) and specify the period. For example, to show data for the last 6 months, you would select "Months" and choose the "Last 6 months" radio button.
  5. Click "OK." Your view is now filtered to that relative date range. Every time the workbook is opened, it will dynamically update based on the current date.

When to use this method:

It’s ideal for automated reports and performance dashboards where you consistently need to see recent data without any manual adjustments.

Method 2: The Interactive Range of Dates Filter (Slider)

If you want to give your dashboard users the power to choose their own date range, the "Range of Dates" filter is your best friend. This creates a simple slider that users can adjust.

Step-by-Step Instructions:

  1. Drag your date field (e.g., Order Date) onto the Filters card.
  2. In the "Filter Field" dialog box, select "Range of Dates" and click "Next".
  3. The filter card will now show the entire date range available in your data.
  4. Right-click the new filter on the Filters card and select "Show Filter." A date range slider will appear on the right side of your worksheet.

Users can now drag the start and end point sliders to define their own custom date range. They can also click on the displayed dates to bring up a calendar for precise day selection.

When to use this method:

This is the go-to choice for exploratory dashboards where users need the flexibility to zoom in on specific periods of their choosing.

Method 3: The Ultimate Flexibility with Start and End Date Parameters

While the range slider is good, sometimes you need even more control. Using parameters for the start and end dates gives you a cleaner user interface (two calendar pop-ups instead of a slider) and allows you to use those selected dates in other calculations if needed.

This method involves three parts: creating two parameters (one for the start date, one for the end date) and then a calculated field to link them to your data.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Step 1: Create a 'Start Date' Parameter

  1. In the Data pane, click the small dropdown arrow at the top and select "Create Parameter...".
  2. Name your parameter. Something clear like "Start Date" is perfect.
  3. Set the Data type to "Date".
  4. For "Allowable values," choose "All" to allow any date selection.
  5. You can optionally set a "Current value" to be the default start date when the workbook opens. Click "OK".

Step 2: Create an 'End Date' Parameter

  1. Repeat the process above to create a second parameter. Name this one "End Date".
  2. Again, set the Data type to "Date" and "Allowable values" to "All".
  3. Set a default "Current value" for the end date. Click "OK".
  4. Now, right-click on both new parameters in the bottom-left pane and select "Show Parameter." You should now see two date selection boxes on your screen.

At this point, the parameters are just isolated controls - they don't do anything yet. The next step is to tell Tableau how to use them.

Step 3: Create a Calculated Field to Connect the Parameters

This calculated field will act as our "on/off" switch. It will check every record in your data and return "True" if its date falls between the Start and End Date parameters, and "False" otherwise.

  1. In the Data pane, click the dropdown arrow again and select "Create Calculated Field...".
  2. Name it something intuitive, like "Date Range Filter".
  3. Enter the following formula in the calculation window. This formula tells Tableau to include the data if its date is on or after the selected 'Start Date' AND on or before the selected 'End Date'.
[Order Date] >= [Start Date] AND [Order Date] <= [End Date]
  1. Replace [Order Date] with the actual name of your date field if it's different. Click "OK".

Step 4: Apply the Calculated Field as a Filter

This is the final step that brings it all together.

  1. Find your new calculated field ("Date Range Filter") in the Data pane. It will have a "T|F" icon next to it.
  2. Drag this calculated field directly onto the Filters card.
  3. A small filter window will appear. Check the box for "True" and click "OK".

That's it! Your view is now controlled by the "Start Date" and "End Date" parameters. When a user changes the dates in the parameter boxes, the calculated field filter automatically updates the visualization to show only the data within that selected range.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

When to use this method:

Parameters are excellent for polished, user-facing dashboards. They offer a clean interface and are essential if you need to perform other calculations based on the user-selected date range (e.g., calculating the number of days in the selected period).

Final Thoughts

Mastering date filters in Tableau is a foundational skill that unlocks deeper analysis. We've covered the simple "out-of-the-box" relative and range filters, as well as the more robust method of using start and end date parameters with a calculated field to give you and your audience complete control over the timeframe.

While these methods provide great power within Tableau, building them still involves multiple steps, calculated fields, and understanding how different components interact. We built Graphed because we believe getting answers from your data shouldn't require a steep learning curve. Instead of creating parameters and calculated fields for a date range, our natural language interface lets you simply ask, "show me website traffic and conversions from last month compared to the month before," and get a live, interactive dashboard in seconds. Our goal is to connect you directly with your insights, removing the manual setup for you.

Related Articles