top of page

How to Use Today's Date as a Default for a Date Parameter

Are you using a date parameter in your dashboard? Did you know there is a way to set today's date as the default?

Date Parameter Creation

You can create a date parameter as shown below.

Adding a Parameter to a Custom SQL

When you are connecting to a database in Tableau, you can create a custom SQL and insert a date parameter. You must have the date parameter created first in order to do this. You can insert it by clicking on the Insert Parameter button and then selecting the date parameter you created.

Once you insert the parameter in the query, it will show up with <> brackets around the parameter name. Also make sure it comes after the where clause. You could write something like where [DATE IN DATA] <= <Parameters.Custom|Date>

Changing the Default to Today's Date

You will need to create a Calculated field with the today formula as shown below;



Make sure this calculated field is formatted as a date.

Then you need to edit the date parameter. In the parameter pop-up menu, select the Today calculated field under Value when the workbook opens.

Ken Flerlage also advised of this method as a response to a question in this community help question here!

Tomorrow Instead of Today

If you want your dashboard to be blank for the user, forcing them to make a date change, I would suggest changing the Today formula to look at tomorrow's date.



Since there will never be data for tomorrow's date, the dashboard will appear blank, until your user changes the date, or enters a date in the Parameter. Make sure the Custom Date parameter is displayed in order to do so.

324 views0 comments


bottom of page