Help applying a predictive model (calculated field) to worksheet
Caleb Smith Sep 6, 2016 8:24 AMHi all,
This is my first attempt to apply a predictive model to data in Tableau and I need some help. I've developed a function to predict a value 30 days in the future with satisfactory results and would now like to visualize it in Tableau.
First, the equation:
I have two independent variables and a dependent variable. The DV is "y". The IVs are "days" (1, 2, 3,...n) and the value of "y" 30 days ago (represented here as "delay(y, 30)"
I would like to do two things:
1. Create a worksheet that displays the observed results vs the predicted results, similar to the image below (where blue = observed, red = predicted)
2. Create a way to extrapolate the predicted value out arbitrarily far into the future. For example, my equation uses the y value from 30 days ago to predict a current value of y. This means that when I reach the end of my observations I can only show a value 30 days into the future (current day + 30). I would like to figure out a way to feed the predicted values back into the equation in order to go further into the future. I would like to specify a value of y and then show the day upon the model predicts that y will be reached. The further into the future this day lies, the more the accuracy of the model will suffer, but that's OK and expected. I'd just like to know how to do it.
WHAT I'VE DONE SO FAR:
I've created a workbook with some actual data that I've attached here. In this workbook I've created a calculated field called "Prediction Model," which translates the equation I listed above into the language of Tableau.
WHERE I NEED YOUR HELP:
1. How can I apply my calculated field to the observed data to get a graph like the one above?
2. How can I feed the predicted values back into my model in order to extrapolate further into the future?
Please let me know if anything is unclear or if I've left out any important information. I've used Tableau quite a bit for simple visualizations but this is the first time I've tried to visualize a predictive model in the tool. Any help you can provide would be greatly appreciated!

prediction.twbx 24.0 KB