Tableau Quick Tip: Dynamic Date Parameters

Have you ever built a viz that’s practically perfect except for one little thing?

You really want to be able to quickly switch between date levels within the same viz.

Fear not, I have a quick little solution for you. 

We’ll start off by creating a parameter. I’ve named mine “Date Level Parameter” but you can name it whatever makes the most sense for you and your use case.

Make the data type a string. Since we’re using SuperStore in this case, we’re going to list the values as ‘month’, ‘quarter’, and ‘year’. This capitalization is important because they match Tableau’s language for the date parts.

Next, you’ll create a table calculation “Dynamic Date” using DATETRUNC. The standard use case for DATETRUNC is to bring your date field to the level of detail/accuracy that you specify, as seen below.

You’ll drag in the parameter you just created, followed by the Order Date field. 

You’ll then move that Dynamic Date pill onto columns, and make it an exact date. If you miss this step, your intended interactivity won’t work. 

Next, show the parameter on your sheet. I like to drag mine over to the left under the Marks card so that it doesn’t take up extra space on the right and is closer to other interactivity cards. 

Now you’re able to quickly switch between different date levels within the same visualization. 

Author:
Eliza Hokanson
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
© 2025 The Information Lab