Populate Table with "trendline"

Has anyone added a trendline to an excel chart then, set that line to forcast out a certain number of periods?  The chart control in SQL Reporting Services does not have the trendline or forcast option.

I would like to populate a table with these trendline data points, including forecast, and then make a chart from that.  I am looking for a way to derive these trendline data points from a given dataset.

I am looking for someone to point me in the right direction.  Possible a stored procedure solution that accepts  a table as input?  My data will look like this.

1/14/2008      15,116,494
1/16/2008      15,238,909
1/22/2008      15,249,179
1/25/2008      15,336,006
1/28/2008      15,342,146
donnatroniousAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grendel777Commented:
Hi donnatronious,

I believe you'll either need to learn some statistics and include the future points as calculations in your SELECT statement, or you can save the values as a comma-separated file (Excel .csv) and use the BULK INSERT statement to bring the data into your table:

BULK INSERT Northwind.dbo.[Order Details]
    FROM 'f:\orders\lineitem.tbl'
    WITH
        (
            FIELDTERMINATOR = '|',
            ROWTERMINATOR = '|\n'
        )

Open in new window

0
mfsamuelCommented:
This link has code that demonstrates predicting future values via a trend line.  You should be able to convert this to a stored procedure to do what you need.  The dates may or may not work on the x axis, but you can give it a try and if it doesn't add an index that coresponds to each day.

http://www.webservertalk.com/printthread.php?s=70b69ad6e06ee93735f6f74a628a618a&threadid=111656
0
mfsamuelCommented:
the bottom of the page has the code you need, and an example.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.