This will be doable but not an easy task. Check this similar thread http://community.tableau.com/thread/105979?start=0&tstart=0
You can also use the following formula:-
Round((Avg([X]*[Y])-Avg([X])*Avg([Y]))/VarP([X]),6)) AS RegressionCoefficient
This is a formula we can use in SQL. Here X is Date field & Y is the sales field.
I think someone else will help you who was already achieved the same.