Quantcast
Channel: InterWorks
Viewing all articles
Browse latest Browse all 2698

Tableau Class Notes: Filtering with a Date Slider

$
0
0

This question comes from my student Christie. She wanted a quick way to create a date slider that started after a certain point in her data. The issue is, if you set your Range of dates or Starting Date filter to begin at a certain date, your user can still adjust it to go back to the beginning of your data:

filtering with a date slider in Tableau

filtering with a date slider in Tableau

So what’s the solution here? Just create a quick calculation. Since we want our slider to only start after a certain date (in our case, 12/31/2011), we can create a calculated field that will return only dates after our desired start date:

filtering with a date slider in Tableau

This calculation looks at everything after whatever our starting date should be and returns an Order Date. If it’s not after 12/31/2011, then we can just discard it as a Null! We can then place this calculated field on our filters card since the resulting data type is a date. When you show that filter, allowing your users to choose their own date range, the data will now only start at 2012. Just what we wanted!

filtering with a date slider in Tableau

That’s all there is to it—a quick fix to what can be a very frustrating issue with filters. Thanks for reading, and see you in class!

The post Tableau Class Notes: Filtering with a Date Slider appeared first on InterWorks.


Viewing all articles
Browse latest Browse all 2698

Trending Articles