COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: ari_meta on 06 Nov 2012 02:42:27 PM

Title: Grouping of customer name
Post by: ari_meta on 06 Nov 2012 02:42:27 PM
Hi All
In the Bar chart, i would like to group few customers in a single bar based on a condition. The rest will be display individually.
Such as
Customer Name  Revenue ($)

A                   5
B                  10
C                   35
D                   30
E                   20
Gross Total of revenue 100 , 15 % of total = 15 , If customers have revenue less the (15 % of gross total), They should be grouped in one bar. In the bar chart , users will be 4 bars (group of A & B, C,D,E).

Any help on this.

Thanks

Ari
Title: Re: Grouping of customer name
Post by: blom0344 on 07 Nov 2012 02:46:13 AM
You basically need a query and a query reference (i.e.)

The first query contains the name,calculated percentage and a running total on the percentages.
Define a sort on the calculated percentages to get the running total right

Use this query as input for a 2nd one. Add to this something similar as:


CASE WHEN [Query1].[Calcitemquery1] < (15/100) THEN 'Group1' ELSE
[Query1].[Name] END
Title: Re: Grouping of customer name
Post by: andy_mason_84 on 07 Nov 2012 03:51:47 AM
Just in addition in Cognos 10 this can be done for you as a property on the Chart itself.
Title: Re: Grouping of customer name
Post by: blom0344 on 07 Nov 2012 04:37:24 AM
Not yet very much into Cognos 10, but really interested Andy. Can you give us a clue where to look?
Title: Re: Grouping of customer name
Post by: pricter on 07 Nov 2012 04:42:46 AM
There is an option in chart

"Summarize small items"

http://publib.boulder.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id7316small_slices.html (http://publib.boulder.ibm.com/infocenter/cbi/v10r1m0/index.jsp?topic=%2Fcom.ibm.swg.im.cognos.ug_cr_rptstd.10.1.0.doc%2Fug_cr_rptstd_id7316small_slices.html)
Title: Re: Grouping of customer name
Post by: blom0344 on 07 Nov 2012 06:47:15 AM
I may have missed it, but the documentation seems to skip the part of deselecting  'Use legacy chart authoring'   :o

Again, I'm still on 8.4.1       ::)

Hopefully Ari can make things work with my suggested workaround.
Title: Re: Grouping of customer name
Post by: ari_meta on 07 Nov 2012 12:21:00 PM
Thanks all for your suggestion.

I could get the result in the list. But in the bar chart, i only get single bar with some random number on it.

Any more suggestion please  ?

Thanks
Ari
Title: Re: Grouping of customer name
Post by: blom0344 on 07 Nov 2012 01:23:52 PM
you do know how to build a chart?  It's hard to give you feedback if you do not tell us some more details..