COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: SGD on 03 Nov 2011 10:10:40 PM

Title: Bar chart issue
Post by: SGD on 03 Nov 2011 10:10:40 PM
Hi All,

I have a bar chart with 4 different bars/series. Chart displayes 'Week' on x axis and 'Count' on y axis. I have 4 different series which are count of a,b,c & d respectively.

When I see query out put in list or tabular view then it shows proper data as below:

Week     type     count
---------------------------
week1    a          10
               b          5
               c           0
               d          2
week 2   a          4
               b          1
               c           7
               d          1
and so on...

But when I try to display similar data in bar chart it shows only 1 bar for week 1 for type 'c' with count '17' (which is total count of a,b,c & d for week1) and only 1 bar for week 1 for type 'd' with count '13' (which is total count of a,b,c & d for week2) and so on...Ideally it should show 4 different bars for each type's count for respective weeks.

Since I am not using 'Type' query item in chart, I have tried to add in properties of 'Week' dataitem on x axis and properties of each series of 'count' on y axis but still it shows similar data.

How should I resolve above issue? any clue?
Title: Re: Bar chart issue
Post by: SGD on 04 Nov 2011 12:43:29 AM
Hi,

I have compared generated SQLs of both list and chart and found that chart query does not get grouped by 'Type' query item hence it shows total count of all the types as a single bar.

But I am not sure how can I set group by clause in chart's query.

Any idea?  ???

Your help is highly appreciated.
Title: Re: Bar chart issue
Post by: SGD on 04 Nov 2011 01:06:01 AM
That is what I got and I have already applied it to chart's series but still nothing is happening correct. Not sure whether I have applied it correctly or not?

QuoteProperties
Specifies a list of data items from the query in scope to associate to the selected object. This is necessary when you want to reference a data item that is in the associated query, but not used in the layout. For more information, see the Report Studio Professional Authoring User Guide.

Title: Re: Bar chart issue
Post by: SGD on 06 Nov 2011 07:08:55 PM

Hello Gurus,

Any idea to resolve this issue? I am still struggling with it  :o
Title: Re: Bar chart issue
Post by: blom0344 on 07 Nov 2011 12:55:21 PM
You can associate a dataitem that is not used in the layout with a chart. However, the chart does not have the properties setting itself. You need to search around a bit , from top of my head the tiltle has a properties setting you can associate a data-item (not used in layout) with