---
schema_version: "1"
id: 1c883b2000b29a81bb5895932421954db4793773f6690205fdb1ba6bb5c53dee
title: Create Relative Date Filters
collection: tableau
version: next
locale: en-gb
portal_url: https://docs.salesforce.com/tableau/next/en-gb/public/desktop/qs_relative_dates.md
canonical_url: https://help.tableau.com/v0.0/public/desktop/en-gb/qs_relative_dates.htm
source_site: help.tableau.com
content_type: documentation
content_hash: 54b605738a39dd4d695e5608a79fbfd703eaa3890d9813990ff1413ac9e21bc8
description: Create relative date filters that dynamically show recent time periods.
---
[Skip to main content](#main-content)

# 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, select Relative Date and then select Next.

![Filter field dialog box with options to filter by relative date or range of dates.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates1.png)

### Step 2: Select a time unit

In the Filter dialog box, select 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.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates2.png)

### 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, select Last and then enter the number 3.

![A drop-down menu with options to filter by relative dates, including previous, upcoming or the current week.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates3.png)

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 26 April 2015 to 2 May 2015.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates4.png)

**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 7th January, Tableau will display dates for 1st January to 31st January.

### 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.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates5.png)

Once created, you can show relative date filters in the view as cards. See [Display interactive filters in the view](https://help.tableau.com/v0.0/public/desktop/en-gb/filtering.htm#ShowFilter). To confirm the specific date range, users can select the menu on the filter card:

![A viz filtered to relative dates from 1/1/2018 to 31/12/2020.](/tableau/next/en-gb/public/desktop/en-gb/Img/qs_relative_dates6.png)