Date Filtering in Tableau

Tableau gives us a great way to filter our data by dates.

Using the superstore dataset, I will demonstrate how to use date filters.

For this example, we will use a bar chart that shows Sales by Subcategory

The first thing you'll want to do is drag the Order Date field onto the filter card

When you drag your date field to the filters card you'll be presented with this screen. Our main areas of interest are the 2 sections I've outlined in red.

I'll start with the bottom section as it is the easiest to understand. These options will allow you to select which years, months and days you'd like to have displayed in your viz.

For example, if we select Years, we are presented with another screen

Select what year(s) you want to filter by and click OK. Tableau also gives you the option to exclude specific years if you click on the exclude checkbox.

We now have our chart filtered by whatever Years you selected. In this case, only the sales data for 2018 is displayed

If you wanted to filter dates to look at a specific range of dates, select either 'Range of Dates' or 'Relative Dates' after you drag Order Date to the filters card. You'll be presented with this window

Relative dates will allow us to select how many days, weeks, months or years worth of data we would like to see, relative to a certain date. By default, Tableau will select today but you can choose a specific date by checking the 'Anchor relative to...' check box.

Range of dates lets us choose a specific range:

Starting/Ending date allow us to choose where we would like data to start from or end at

Special allows you to filter through null values, but I imagine for most people would see very limited use compared to the other options above

... And that's pretty much all you need to know to start filtering your data by Date.

Author:
Jacob Kilroy
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab