
1. Re: How do I calculate a weighted, multipart, running average for modeling complex projections?
Alex Kerin Sep 22, 2013 8:08 AM (in response to Jonathan Wilkendorf)You can do this in Tableau because we can set the window of window_avg:
(0.9*window_avg(attr([E]),9,0)
+0.7*window_avg(attr([E]),19,10)
+0.5*window_avg(attr([E]),29,20)
+0.3*window_avg(attr([E]),39,30)
+0.1*window_avg(attr([E]),49,40))/5
If you have row on the view, you can set the calculation to Table down, but I prefer to explicitly set the sort:

3. Re: How do I calculate a weighted, multipart, running average for modeling complex projections?
Jonathan Wilkendorf Sep 22, 2013 1:28 PM (in response to Alex Kerin)Thanks, Alex! That will work nicely as long as I keep as many rows in my view that the average will be calculated from.

4. Re: Re: How do I calculate a weighted, multipart, running average for modeling complex projections?
Jonathan Wilkendorf Sep 22, 2013 1:58 PM (in response to Alex Kerin)Oops. I spoke a bit too soon. The window_avg works just fine for calculating the running average, but I'm still having difficulty figuring out how to use it correctly for the parameter controls that I am intending. On my updated attached workbook, the sheet "Partial Projections avg100" shows a simplfied use of window_avg but it is not yet tied to the Projection Rate control, so the Projection Rate only affects the "E" measure and not the "C" measure. The sheet "Full Projections avg100" is my failed attempt at also connecting the "C" measure to the Projection Rate, but you can see from the graph that the C Projection does not follow the same type of curve as in the other sheet. It is only looking at the current E Projection value rather than the running average from window_avg.
Can you tell me what I am doing wrong? It seems so close. Thanks so much for your help!
Jonathan

ProjectionTest2.xlsx 29.8 KB

ProjectionTest2.twbx.zip 92.4 KB


5. Re: Re: Re: How do I calculate a weighted, multipart, running average for modeling complex projections?
Jonathan Wilkendorf Sep 22, 2013 2:05 PM (in response to Jonathan Wilkendorf)My apologies! With a little extra time looking at it, I was able to find my mistake. Fixed version is attached. Thanks so much for the help in guiding me down the right path!

ProjectionTest2.twbx.zip 92.3 KB


6. Re: How do I calculate a weighted, multipart, running average for modeling complex projections?
Alex Kerin Sep 22, 2013 4:19 PM (in response to Jonathan Wilkendorf)You're welcome.