I have a time series chart. It shows something like CPA over time. I have another line on the dual axis that shows the CPA moving average. The number of periods is based on a parameter that dynamically controls how many periods to average.
All well and good so far...
But, I want to have a date parameter that allows the user to click on a certain date. When the user clicks on that date, they'll only see the last N periods of data to look at on the chart ... WITHOUT filtering on the date range and messing up the moving average for the earliest date they'll see on the chart.
So, no true filter of dates on the chart and user is limited to view their selected date + N previous periods on the chart.
Catch my drift? Can Tableau do this?
-dave
Hey ya'll I figured it out. It was as simple as creating a new boolean calc and adding that calc to my filters section where the only acceptable value is 1.
if date([Date]) <= [Date Current] and date([Date]) >= [Date Minus 2 Weeks]
then 1 else 0 end
To get the [Date Minus 2 Weeks] calc:
DATEADD('week',-2,[Date Parameter])
Not sure how much more I can share on here... but if you have any further questions let me know!