If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Trend Line (RS]

Started by cognosjon, 14 Jun 2007 09:27:29 AM

Previous topic - Next topic

cognosjon

Surprisingly I have today been asked to provide a trend line on a few charts that we have in use, only surprised that the request has taken so long to come through :o.

I've scoured the Cognos KB on the best way/easiest way of achieving this and can find only one KB doc:1024310 that details the following and has a GO sales sample file with it:
his is possible using a linear fit which is a least squares regression line and is calculated as follows:

'Using N values of X and Y, and fitting the line to the expected Y' values for given X values we do the following

Y' = a + b*X

a = (Average(Y)*Total(X*X) - Average(X)*Total(X*Y))/(Total(X*X)-N*Average(X)*Average(X))

b = Total(X*Y) - N*Average(X)*Average(Y)/(Total(X*X)-N*Average(X)*Average(X))

Keep in mind that you have to group and summarize the individual data appropriately before doing these '


Does anyone use a different method of achieving this? ???

Any pointers would be helpful

Cognosjon

jguevin

have you tried under properties for the chart...look in the Chart Annotations section, you could use the baseline feature to add a trend line.

hope this helps
Jeff

doremifasolasi

Y' will be like this:

((total(minimum([X]*[Y] for [X]) for report)-total(minimum(1 for [X]) for report)*average(minimum([X] for [X]) for report)*average(total([Y] for [X]) for report))*[X] + (average(total([Y] for [X]) for report)*total(minimum([X]*[X] for [X]) for report)-average(minimum([X] for [X]) for report)*total(minimum([X]*[Y] for [X]) for report)))/(total(minimum([X]*[X] for [X]) for report)-total(minimum(1 for [X]) for report)*average( minimum([X] for [X]) for report )*average( minimum([X] for [X]) for report ))