How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (2024)

So, earlier, you created a great report showing sales for the month and published it out to the server. The next month, your manager comes back and complains that the report is set to show last month’s data. Why doesn’t the report just update to the most recent month when the extract is refreshed?

This a familiar topic in the Tableau community, and you can find some of the many different workarounds people have come up with here and here.

Below is an example of what I like to think is one of the simpler workarounds available. Download the attached files and update the end date in the Excel file to test it out. This solution will not meet the needs of every possible use case, and it does not give you a familiar drop-down filter to select dates from. Feel free to comment with the workaround to this problem that you prefer.

Below is an image of the worksheet that I want to have updated when the extract is refreshed. Currently, the date range is set by a discrete filter on month and year:

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (1)

First, in the worksheet, add the date variable to the Rows shelf, set the display level to show the date part you need in discrete format and remove the date filter. In this example, I am using the month date part so the chart is now displayed for each month.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (2)

Next, create a calculated field with the formula LAST()=0 to filter out all but the most recent month with the default table calculation set to run off of the date variable.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (3)

Add this new variable as a filter set to True. If this does not filter out all but the most recent month, go back and adjust the table calculation.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (4)

The worksheet now automatically updates to the most recent month in the extract when opened, but your manager also wants the option to review historical sales for the same month last year. If you add in a discrete date filter now, it will lock the worksheet to the month currently selected when the extract is refreshed. To maintain the automatic updates, add the date variable as a Filter > Range of dates > Special > All dates. Now, the table will update to the most recent date inside of the date filters range.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (5)

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (6)

*** DISCLAIMER (Read this next paragraph closely or you will be doomed to failure)

Once the date range has been adjusted in the filter, the worksheet will no longer update to the most recent date when opened. Before saving a file with this kind of filter, always edit the filter and check that it is set to Special > All dates. Similarly custom views saved on Tableau Server with the date range adjusted will not update when the extract is refreshed but the original view will.

Now, your manager can use the slider, type in the date or click on the date and use the calendar to adjust the time period shown in the chart. The date filter can be customized to hide the slider or if users only need to see the results as month to date the start date can be hidden by a blank text box to clean up the display. The hard part is convincing the manager that entering a date or selecting it from a calendar is easier than scrolling through a giant drop-down list of every day in the last few years.

Calendar

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (7)

Drop-Down

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (8)

Attached below is a zip file containing the workbook used in this post and an Excel file that generates data for the workbook. To test that the month displayed in the workbook updates automatically, open up the Excel file, change the End Date and save the file.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (9)

Now, when the workbook is opened, it will update to the most recent month. If the workbook is already open, go to a worksheet, right-click on the data source and select Refresh.This will not work if the date filter was adjusted before the refresh or the file was saved after the date filter was adjusted.

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks (2024)

FAQs

How to Set Tableau Dashboard Filters to Automatically Update to the Most Recent Date - InterWorks? ›

To maintain the automatic updates, add the date variable as a Filter > Range of dates > Special > All dates. Now, the table will update to the most recent date inside of the date filters range.

How do I set Tableau dashboard filters to automatically update to the most recent date? ›

Go to your date slider in the view, click the menu arrow, and choose Start Date. Your filter will look like this. You can still choose earlier dates if you want to. I tested it, and when I add new dates and then refresh the data source, the filter updates automatically.

How do I create a dynamic date filter in Tableau? ›

  1. Step 1: Drag a date field to the filter shelf.
  2. Step 2: Select a time unit.
  3. Step 3: Define the date period.
  4. Step 4: Watch the view update.

How do I make the date filter default to yesterday in tableau? ›

Right-click and drag the date dimension to the filter shelf. Select Relative dates > Yesterday. From the filter shelf, right-click the date dimension and select Show Filter.

How do you filter to the latest date and time in tableau? ›

Select Analysis > Create Calculated Field. In the Calculated Field dialog box that opens, enter a name for the field. Drag the newly created calculated field from the Measures pane to the Filter shelf. In the Filter dialog box that opens, select max date, and then click OK.

How do I make Tableau dashboard refresh automatically? ›

In the Refresh Extracts dialog, select Schedule a Refresh, and complete the following steps:
  1. Select the schedule you want.
  2. If available, specify whether you want a full or incremental refresh. A full refresh is performed by default. ...
  3. Click Schedule Refresh.

Do Tableau dashboards automatically update? ›

Usually live data will be updated every time you open the dashboard. If you want to control the time interval when the dashboard is opened then you can use the auto refresh extension.

How do I create a date filter parameter in Tableau? ›

Step 1: Create Start Date and End Date Parameters
  1. In the left-hand data pane, click the drop-down arrow at the top right of Dimensions, and then select Create > Parameter.
  2. In the Create Parameter dialog box, name the parameter. ...
  3. Under Data Type, select Date.
  4. Under Allowable values, select Range.
Nov 27, 2023

How to create a date filter in Tableau dashboard? ›

In order to add the slicer, you should be able to drag and drop the date field onto the Filters shelf which then presents the option to define the filter type. Select 'Range of Dates' and click OK to finish creating the filter.

What is the formula for the latest date in Tableau? ›

How to get value for the latest date in date range filter? [Date] = {MAX([Date])} field and then setting it to True.

How do I add a year to a date filter in Tableau? ›

Easy to create Tableau YTD Filter & Full Year Filter
  1. First create Parameter in Tableau. Create a new parameter and let's call it “YTD/FY Selection” as a String, just click on triangle shape on fields shelf in tableau and select parameter. ...
  2. Second create calculated field. ...
  3. Set in Chart area:

How do I update filters in Tableau dashboard? ›

To add a filter in the dashboard, bring the respective sheet in the dashboard and select the field container. From the dropdown menu select filters and add the filter in the dashboard. Hope this helps!

How do I create a date filter parameter in tableau? ›

Step 1: Create Start Date and End Date Parameters
  1. In the left-hand data pane, click the drop-down arrow at the top right of Dimensions, and then select Create > Parameter.
  2. In the Create Parameter dialog box, name the parameter. ...
  3. Under Data Type, select Date.
  4. Under Allowable values, select Range.
Nov 27, 2023

What is the formula for the latest date in tableau? ›

How to get value for the latest date in date range filter? [Date] = {MAX([Date])} field and then setting it to True.

How do I update filters in tableau? ›

On the dashboard, if you select the sheet by clicking on its chart and then click on the down arrow in the upper right corner of the box that appears. Select "Filters" from from the drop down list, and your new filter should appear in the list. Click on it and it will be added to the dashboard.

Top Articles
Latest Posts
Article information

Author: Roderick King

Last Updated:

Views: 6218

Rating: 4 / 5 (71 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.