One Set of Date Filters to Rule Them All

If you are a Tableau and Salesforce analyst/administrator, this post will likely resonate with you. Salesforce data sets tend to have more than a few date fields in them. That being said, it’s definitely not exclusive to that particular context and use case. Here goes…

The Problem:

You have a data set that contains multiple Date fields. You are creating several views for your dashboard, each of which uses a different date field to identify trends over time. On your dashboard, you don’t want to have several date filters…one for each view. Having multiple date filters on a singular dashboard causes clutter and confusion for your audience. However, since each view uses a different date field, adjusting one of the filters does nothing for the rest of the views that don’t contain that particular date field.

The Question:

How can I get all my views to be controlled by one filter, or in this case, one Begin Date filter and one End Date filter?

The Solution:

Create two parameters and several calculated fields (details of which are below) that allow you to control all of your date fields, and thus, the entirety of your dashboard.

First of all, you need to create two Date parameters, where you manually adjust the Minimum value to match the earliest date value in your entire data set. You’ll want to leave the Maximum value untouched, allowing it to adjust to whatever your audience chooses. Then change the Step Size to “1 Months”.

Secondly, you’ll need to create the following calculated field for each of your views on your dashboard:

[Date Field] >= [Start Date_Universal Filter] AND [Date Field] <= [End Date_Universal Filter]

Note: You need one of these calculated fields for each view. Use the particular date field that pertains to each view as your [Date Field].

For a step by step overview, here’s a quick how-to video using the Superstore data set for your viewing pleasure…

 

Thanks for taking a look. Hope it was helpful

-Bill