Create Relative Date Filters

Relative date filters dynamically update to show a time period relative to when you open the view, such as the current week, the year to date, or the past 10 days. Relative date filters make it easy to create views that always show the most recent data.

Step 1: Drag a date field to the filter shelf

Drag a date field from the Data pane to the Filters shelf. In the Filter Field dialog box, click Relative Date, and then click Next.

Filter field dialog box with options to filter by relative date or range of dates.

Step 2: Select a time unit

In the Filter dialog box, click Relative dates, and then select the unit of time for the filter. For example, to show only the last three weeks, select Weeks.

A dialog box with options to filter dates. You can filter by specific dates or relative dates, such as this week, last week, or next week.

Step 3: Define the date period

Use the options in the lower part of the Filter dialog box to specify which date period to include in the view. For example, to show the last three weeks, click Last, and then enter the number 3.

A dropdown menu with options to filter by relative dates, including previous, current, upcoming, or the current week.

The specific range of time that you have selected is displayed in the upper right of the Filter dialog box.

A viz filtered to relative dates from April 26, 2015 to May 2, 2015.

Note: “Last” date periods include the complete current unit of time, even if some dates haven't occurred yet. For example, if you select the last month and the current date is January 7th, Tableau will display dates for January 1st through January 31st.

Step 4: Watch the view update

The view will now update to always show the relative date range you've chosen.

A line chart displaying profit trends across the order date.

Once created, you can show relative date filters in the view as cards. See Display interactive filters in the view. To confirm the specific date range, users can click the menu on the filter card:

A viz filtered to relative dates from 1/1/2018 to 12/31/2020.