COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: SindhuR on 08 May 2014 01:45:02 PM

Title: Crosstab
Post by: SindhuR on 08 May 2014 01:45:02 PM
How do I build a crosstab where the rows change??
What I am looking for as per the attachment is . I am trying to ge the % column in. When I created the data Item for A,B,C,D,E and dragged them to the row. I got the column Count. I need help to get the % column. In this case you will notice that the rows are grouped by month.

Thank you
Title: Re: Crosstab
Post by: Lynn on 09 May 2014 06:59:11 AM
You might get better advice if you indicate whether your source is relational or dimensional. You also should mention what the percentage calculation is based on. Is it based on the monthly total or the overall total? Putting some numbers into your example to illustrate further might make sense.
Title: Re: Crosstab
Post by: SindhuR on 09 May 2014 09:37:33 AM
I have added additional numbers and notes to the attachment . Please have a look at it. Thank you
Title: Re: Crosstab
Post by: Lynn on 09 May 2014 10:05:46 AM
Relational or dimensional source?
Title: Re: Crosstab
Post by: SindhuR on 09 May 2014 10:14:36 AM
Dimensional source
Title: Re: Crosstab
Post by: Lynn on 09 May 2014 10:30:39 AM
Sorry, I'm still not sure you are providing enough information. In your attachment you mention that you have separate calculations for each of your row members, but the expressions you indicate, below, are really relational constructs rather than dimensional. What does xxxxx refer to? Do you have a count measure in your source? What do your hierarchy structures look like?

Perhaps your source lacks the elements you need for reporting. Do you have any option to talk with the modeler to have some changes made to make this type of analysis more straightforward?

Quote
A= count( distinct if ( xxxxx ='1') then (1) else(0))
B= count (distinct if (xxxxx = "1','2','4') then(1) else(0))
Title: Re: Crosstab
Post by: SindhuR on 09 May 2014 10:38:49 AM
XXXX I am refering  is a data Item which is called
[Recommendation Code]

To get a count for A  it si adding all  [Recommendation Code] =1 for that Month
To get  a Count for B - It is adding all [Recommendation code] in (2,7, 9,10) for that Month.

I need help to get the % column. When I calculate and put the % it comes up in different columns instead one below the other.