Create Relative Date Filters

You can create filters to show a date period that is relative to when you open the view. For example, create dynamic filters to only show the current week, the year to date, or the past 10 days. Relative date filters make it easier to create lasting views that you can publish and share.

Step 1: Drag a Date Field to the Filter Shelf

Right-click (control-click on a Mac) and drag a date field from the Data window to the Filters shelf, and then click Relative Date in the Filter Field dialog box.

Then click Next.

Step 2: Select a Time Unit

In the Filter dialog box, click Relative dates and then select the unit of time you want to base your filter on. For example, to filter to only show the three most recent weeks, select Weeks.

Step 3: Define the Date Period

Use the options in the lower part of the Filter dialog box to specify which weeks to include in the view. To show the last three weeks click Last and then select the number 3.

Date periods include the current unit of time. For example, if you select the last three weeks Tableau will include the current week and the two previous weeks. The range of time that you have selected is displayed in the upper right of the Filter dialog box.

Tableau will include all available dates for the time unit selected. For example, if you select Month as the time unit, and the current date is January 7th, Tableau will display dates for January 1st through January 31st.

Step 4: Watch the View Update

The filter will now update to always show the three weeks preceding the current date.

Relative date filters, once created, can be displayed in the view as filter cards.

Thanks for your feedback! There was an error submitting your feedback. Try again or send us a message.