1
votes

I have a Tableau dashboard that contains several views, one of which is intended as a type of title sheet. I added this based largely on the information found here

I have one primary datasource for my workbook, a SQL Server view, and I created calculated fields to determine minimum and maximum date ranges for a field "StartDate" for the data in that view. Maximum date calculation is shown here for reference, i do the same for min as well.

STR(DATEPART('month', MAX([StartDate]))) + '/' + STR(DATEPART('day', MAX([StartDate]))) + '/' + STR(DATEPART('year', MAX([StartDate])))

I also want to have a filter based on "StartDate" with a slider, so that you can filter all the data shown on the dashboard based on changing date ranges.

All of this is working. My only issue is that when I change the filter, it changes the title. I want that title of available date ranges to basically represent ALL the date ranges in the data source, not just what is showing on the newly filtered dashboard.

I found some articles suggesting pulling it in from a secondary data source off the same data, which I attempted to implement by adding a secondary query that performs the min() max() query itself

    SELECT min(StartDate) as DateStart, 
max(StartDate) as DateEnd

FROM [dbo].[MyDataTable]

but then I must connect the two data sources together and that is not possible, as the secondary view contains only the minimum and maximum dates, so the only thing to join on would be the StartDate in the primary data source which would limit our data again.

I want that data sheet containing the title to be essentially disconnected from changes to filters in the dashboard.

Any suggestions?

1

1 Answers

1
votes

Problem is, when you ran that calculation (to get the max startdate) you already filter out the values.

One thing you can do is NOT apply the filter (based on you slider) to the worksheet where you generate the title (I understand that you have this title as a separated sheet, if not, do it). Therefore, the sheet that generate the title will have all data to get the max(startdate)

What I believe you are doing is applying the date filter to all worksheets. If you still want the filter to be applied to multiple sheets, you can select the ones to apply (apply filter to selected worksheets).

Hope this helps