0
votes

I am a new to Tableau and having some issues with it.I am Using a parameter to filter month data across Sheets connected to different Data Sources.

I want to Filter Current Month Data Automatically when the dashboard starts.

Can anyone guide me on how to do it.

Thanks in Advance.

T

3

3 Answers

1
votes

Introduced in version 10.3 is a feature called Latest date preset. The release notes say "Start with up-to-date data. Set filters to display latest date values automatically, as soon as your workbook opens." Create a filter that spans applies across the data sources and use this new setting. The setting is in the filter dialog.

See https://www.tableau.com/new-features/10.3#tab-analytics-2

1
votes

The critical aspect of your question is that you are filtering multiple data sources using a parameter. Given that, the most straightforward approach is to define a boolean calculated field in each data source, called say Within_Date_Range.

Each of those calculated fields should compare the appropriate Date field in that data source to the selected parameter value and return true or false to indicate whether the current record should be included in the query. (Parameters are scoped to the workbook and visible from all data sources)

Place the [Within_Date_Range] field for data source X on the filter shelf for the worksheets that use that data source X. Check the true box of course.

Now when you change the parameter, all the worksheets filter accordingly.

Alternatively, you can abandon the use of a parameter. Define relationships between your data sources using the corresponding Date fields (under the data menu). Show a filter control for the date field for one of the worksheets and set the scope to "related data sources"

0
votes

Hope this helps!

  • Create a calculated field Date_Filter as

    lookup(min([Your_Date_Field]),0)

  • Drag this to 'Filter'; select 'relative date' option and choose last 1 month (because you wanted to show just the current month data by default).
  • Right click this filter and select "Apply to selected worksheet" and choose sheets in which you want this filter to be applied on the dashboard.Viola!

With this solution you can very well see current month's data by default and can go back to as many time periods you want.