Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Following is a requirement that has been taunting me for a week now.
I have a period wise sales info upto current month. I have plotted this in a line chart, with Period as dimension and Sum(Sales) as Expression.
Now my client wants me to extend and project the sales, but he doesnt want it to be done using linest_m and linest_b.
Rather he wants it to done as follows.
1. Till current month the line should plot the actuall data.
2. After that it should continue the flow and go as a straight line (which is not the linear line). Actually what he asks for is to find the slope of the line curve at the current month and continue by drawing a line from there.
Hope I have explained enough.
Any help is appreciated.
Thanks in advance.
Br,
Prasanna.
Well, it seems to me that the client has already made the decision (continue forecast with the slope taken from the last two data points).
I've attached a sample of how you could do this, using the script, or using only expressions in the frontend.
I also switch to forecast in one expression or display the data using two expressions, choose what you like better.
In general, you need to take care of how your data is structured in your table, i.e. if the sampling points are equidistant (one data point per month), appropriately ordered by period (this was the case in your sample), and how to handle the year changes (I introduced a periodID in the script and used date conversions and calculations in the frontend).
Hope this helps,
Stefan
Hi
If Possible Upload ur Sample File
Regards
Perumal A
Hi Perumal,
Thanks for asking....
I have attached a sample file indicating what i have done now and what i actually want in an image....
Kindly look and get back...
Br,
Prasanna
Prasanna, let's see.
What you are asking is a forcast of your sales. This cannot be gussed. Your client needs to decide how to calculate this and then we can help you impement it. you cannot calculate a slope on a point (last month with data)
Well, it seems to me that the client has already made the decision (continue forecast with the slope taken from the last two data points).
I've attached a sample of how you could do this, using the script, or using only expressions in the frontend.
I also switch to forecast in one expression or display the data using two expressions, choose what you like better.
In general, you need to take care of how your data is structured in your table, i.e. if the sampling points are equidistant (one data point per month), appropriately ordered by period (this was the case in your sample), and how to handle the year changes (I introduced a periodID in the script and used date conversions and calculations in the frontend).
Hope this helps,
Stefan
Hi Stefan,
Thank you very much for ur help....
This is exactly that I was luking for....
I prefer the frontend approach....