Chapter 54. 3 Innovative Ways to Use Dates: Tip 3
How to Make Better Relative Date Filters
Have you ever needed to filter to the last 7 days, 30 days, 90 days, and so on in Tableau? Youâve likely found that itâs easy to add a relative date filter by dragging a dimension with a data type of Date to the Filters Shelf, choosing Relative Date, and then showing the filter to access the date range options. These default relative date filters are OK, but they have limitations, including:
- Limited and static anchoring options
- No formatting options
- Requiring manual range selection
This chapter shows you how to make relative date filters in Tableau that overcome all of the limitations of the default relative date filters. You will be able to set up any ranges you want and have one-click access to change date ranges on the fly.
How to Create Flexible and User-Friendly Relative Date Filters in Tableau
The trick for creating relative date filters in Tableau that are flexible and more user friendly than the defaults involves creating sets and customizing each range on the Condition tab of each set. The Condition tab within a set allows you to set up dynamic date ranges that automatically update. By the end of this chapter, youâll know how to set up comparison date ranges and allow users to choose which date range is being used.
Letâs say that I am writing this tutorial on July 14, 2023, and our first relative date range will be the last full seven days. Assuming that our dataset ...
Get Innovative Tableau now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.