see the attached
first welcome to tableau and thanks for including your workbook
a word about filters - they to just that - filter data out of the viz - so trying to apply a slider to look at date ranges is not going to work
I read your post several times and assumed that you really wanted 3 consecutive dates - if you really wanted overlapping dates that will make the solution must more complex
but this creates 3 groups
and this will place a counter on max tem >90 (note this could be a parameter to select a date)
and this is the viz
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
count_days_exceed_threshold.twbx 392.8 KB
As your date ranges overlap...I think we need create separate measures for each date range and temp > 90.
Btw I've had coded the date ranged, before realizing they were full years, so use Jim's YEAR method instead!
So I created True/False for each Date Range
[Date Range 1/1/1869 - 12/31/1965]
[Date] >= #01/01/1869# AND
[Date] <= #12/31/1965#
I then used these to create a field which only contains dates, within each date range, where the Max was over 90.
[Max Temp > 90 1869-1965]
COUNTD(IF [Date Range 1/1/1869 - 12/31/1965] AND
[Max Temp] > 90 THEN [Date] END)
and then used measure names/values to plot each of them on the same chart,
Hope that makes sense and helps,
count_days_exceed_threshold_SR.twbx 388.1 KB
thanks for your help. You nailed it. I wanted three data ranges and the ability to count based on a certain threshold.