1
votes

I know that not many answers for Tableau are on this site, but this site is my first stop to either answer others or get my answers for nearly all of my tasks.

My questions is:

How do you set up a parameter for today's date when a tableau workbook is published to Tableau Server?

I've tried the following:

  1. Set the parameter equal to Today()
  2. Set the parameter equal to a field tied to a dataset from a date dimension
  3. Set the parameter to a field that calls getdate() from sql server.

All of these things work until the workbook is published to tableau server.

The result is ALWAYS whatever the date is when it is published.

The versions are 10.1.1 for desktop and server.

2
Just to clarify, I'm assuming since you are using a parameter that you want the user to be able to change the value, right?Sam M
that is correct. I am just trying to set a default value that can change. And in this case the data type is a date.KeithL
This is the closest I've ever found to setting a default date value in a parameter. Hopefully it will meet your needs. kb.tableau.com/articles/howto/…Sam M
I was worried that was the best answer as I already found it. Using that method makes it really difficult to change dates for the user as the calendar goes away and data is often also looked at on month and quarter ends which need to be scrolled to.KeithL
Maybe look at relative date filters. That allows for a default of Today or any other relative period. I have been using the relative date filters almost exclusively for any viz that uses dates.Sam M

2 Answers

1
votes

From what I understand, Tableau will not dynamically change something (e.g. TODAY() ) unless it is refreshed or republished. We ran into the same issue with a report we developed. Most suggest to do a calculated field.

To try and work-around, can you create another column in your data that is simply =TODAY()? That way when you run your stored procedure and update Tableau Public, it will always utilize the day of when you updated Tableau. Perhaps this will allow you to keep the parameter solution.

Additional Reading

-2
votes

You can do it base on below 2 steps, easy as:

Step1

step2