0
votes

I am relatively new to Tableau and was trying to create a relative date range parameter in my tableau dashboard, I am using SQL server DB as my data source with custom SQL.

I created a date parameter in my tableau sheet,  and it is set from a date key field from database. 

 [![enter image description here][1]][1] 

https://i.stack.imgur.com/hYziI.png

I used the same parameter to create a True False statement for my worksheet. 

enter image description here

After this I created a dashboard with my worksheet and tried filtering out based on range of dates. But I am not able to get range of dates and unable to link dates with the values present in database.

Suppose when I go to a Sheet, and try to filter out based on this FullDateAlternatekey, I can see the relative date range selection and can filter out results.

enter image description here

I created dashboard based on the sheet and used the same parameter being used in the sheet but I am unable to filter out results, and also I am not getting option to have relative dates where I could filter by weeks, years, and other attributes.

This is how my dashboard looks. enter image description here

There is no data for 2018 and also I don't see any options for relative dates.

I looked into this Tableau - Filter/Parameter For Different Date Ranges but did not work. Is there something I am missing to create this date link and have relative dates on my dashboard?

1
Parameters will only ever return a single value, not a range. Why not just use your date dimension directly as a filter ?cmcau

1 Answers

2
votes

You are messing few things here:

  1. When you created a field DateKey then remove fulldatealternatekey from filters part
  2. Now when you place datekey in filters which is a boolean filed you need to select either true or false depending on your requirement, As per my understanding you need to select true so uncheck remaining options.

Now what is your relative date requirement because this will change the logic of Datekey