
1. Re: Find a Min Value Over Last N Years
Naveen Agarwal Jul 11, 2016 1:40 PM (in response to Barry Sheldon)I am sure there is a more elegant way of doing this...but here is one way.
I created a random data set.
Next, I created a calculated field "Min by week" using the following
{FIXED [Week] : min([Value])}
Then I created a chart to show an average value by week and the minimum value for that week regardless of the year. To simplify, I selected Year(date) as a filter.
Does this help?

2. Re: Find a Min Value Over Last N Years
Barry Sheldon Jul 11, 2016 1:55 PM (in response to Naveen Agarwal)I will look into this and see if it fits what I'm trying to do. Here's a graphic of what I'm working towards. The min that I'm trying to calculate is the lower boundary of the gray range. Next, I'm going to calculate the max. Finally, I'm going to find a way to get Tableau to display a full year of data on the X axis, even though the data isn't available. But the first step for me is to try and find this dynamic min.
I am having trouble loading the file because it is on a newer version of Tableau than I am currently running.

3. Re: Find a Min Value Over Last N Years
Ivan Young Jul 11, 2016 8:56 PM (in response to Barry Sheldon)2 of 2 people found this helpfulHi Barry,
To add to Naveen's answer, you'll need to create a calculated field for week. You can do this using DATEPART('week',[YourDate]). Naveen's formula will then give you the lowest value for every week # and you can get the top of your range by doing a MAX instead of MIN.
Regards,
Ivan

4. Re: Find a Min Value Over Last N Years
Pushpendra Nabh Tripathi Jul 11, 2016 11:05 PM (in response to Barry Sheldon)Hi Barry,
Attached is the .tbwx file which is in accordance to what Naveen and Ivan described.
I hope it might help you

Min value for given time.twbx 24.8 KB
