PS
Now there is another, better way, which is shown below.
To the UI for specifying the display range of time series graphs
The default is to show the most recent X days, and you can specify any date in the calendar when you need it."
I often see things like this.
But I can't do the equivalent with Tableau's date filter.
The "Show Last X Days" allows you to set the date filter to "Relative Date". The "Any date" can be set to "Range of dates".
Unfortunately, however, it is not possible to have "relative dates" and "date ranges" at the same time.
There are quite a few requests for this date filter that can be relative and absolute, so I was wondering if there was any way to make it work, and I found the following article.
The article is about how to create a relative filter that can dynamically set the anchor date, but I applied this to create a date filter that can be both relative and absolute.
procedure
Create date selection method
Create a parameter like the image below.
Create start and end dates
Create the parameters as shown in the image below.
Create "End Date" in the same way.
.
Creating a Date Range
Create a calculated field as shown in the image below.
.
Filter date ranges
The key is the calculation field created above, which is TRUE for the intended date, and by putting it in the filter, you indirectly create a "date filter that can be both relative and absolute".
relative date
absolute addressing
Impressions, etc.
Date-specific UIs that can be both relative and absolute are quite common, so it would be very useful to have them as a default feature.
In the example, the relative time range is fixed at 30 days, but if you want to make it variable, you can do so by parameterizing it.