COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: guthikv on 19 Apr 2012 11:38:19 AM

Title: Line Chart
Post by: guthikv on 19 Apr 2012 11:38:19 AM
Hi all,

I am using the Line chart to compare two measures CYTD and PYTD sales for a product. Dragged Product name to X-axis and two measures to Series area one below the other. After this, when I run the report, chart is empty. But when I try the same with the 'Column Chart' it works fine. Any thoughts or suggestions on line charts are greatly appreciated.

Thanks
Title: Re: Line Chart
Post by: Lynn on 19 Apr 2012 01:56:13 PM
Line charts are generally good for showing measures over time. I would expect the X axis to be some timeframe.

Maybe you are just getting two dots on your chart?

For two measures and product I think a column chart sounds like the better choice.
Title: Re: Line Chart
Post by: guthikv on 19 Apr 2012 03:23:13 PM
Exactly. I get two dots on the chart. May be I have to add some time period like months to it?
Title: Re: Line Chart
Post by: Lynn on 19 Apr 2012 03:33:44 PM
This Wikipedia article (http://en.wikipedia.org/wiki/Line_chart) explains line charts a little that might help you. The answer depends on what you are trying to show.

If your requirement is just to compare current and prior YTD figures then a column or stacked column might be just fine.

If your requirement is to show some measure that changes over time then a line chart is a good choice (although current and prior year means different years, so you'd want to have months with a year component as an X axis).

Title: Re: Line Chart
Post by: guthikv on 23 Apr 2012 11:43:53 AM
Thanks Lynn for the response. Basically the requirement was to compare Months (Jan - Dec) again current year and Prior Year and a Trend Line so the executives can compare the ups and down against the trend line.
Title: Re: Line Chart
Post by: Lynn on 23 Apr 2012 01:03:08 PM
In your query you'd need a query item for month but without the year component (e.g., 01, 02, 03...12). That would belong on your X axis.  Without the year component your current year and prior year measures would plot to the appropriate month for a comparison.

If you wanted month names instead of numbers just keep a numerical query item anyway that you can use as a sort key.
Title: Re: Line Chart
Post by: guthikv on 24 Apr 2012 11:07:29 AM
Lynn,

Thanks for the reply. I was able to plot the measures and I was able to see the lines by Months. The issue now is I how to create a trend line on the graph.
The KB document I am looking at is below.
http://www-01.ibm.com/support/docview.wss?uid=swg21340501

On this the trend line is created based on a single measure. But currently i have two separate measures/ columns CYTD and PYTD. Does the above document holds good for the same?
please let me know.

Thanks in advance.
Title: Re: Line Chart
Post by: Lynn on 24 Apr 2012 11:19:13 AM
Ouch. Linear Regression.

Maybe someone else can step in to help you here. I'm not really sure how to answer.