COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sureshkt on 20 Jan 2009 05:11:39 PM

Title: cross tab reports cloumns adding
Post by: sureshkt on 20 Jan 2009 05:11:39 PM
hi
i have a issue with my current crosstab report the reports look like

                               year                                                          Y1
                               q1                     T1    q2      T2       q3    q4
                               jan     feb    mar
                               c   a   c  a  c  a

employee1                 1   3   1  4  5  6    7

employee2                  2   3  1  5  5  7    8


T1=sum of all ''c''  for each quarter
Y1= T1+T2+T3+T4


please let know how find the T1.... & Y1
where 'c' is calculated col ,'a' is average
early reply is appreciated

thanks
Title: Re: cross tab reports cloumns adding
Post by: Rajaggopal on 23 Jan 2009 04:44:14 AM
First off, set the default measure of the crosstab to data item c. After that click on month column in the cross tab and click the aggregate button on the toolbar and select Total. This should give you column T1...T4, the total of column 'c' for each quarter. To get Y1... Yn repeat the same procedure by clicking the Quarter column in your crosstab. The below are the exact steps to be followed.

1. Click on any crosstab cell, select the ancestor button on the properties pane and select Crosstab.
2. Now select the Default Measure property and choose column c as the default measure.
3. Click Month column and click aggregate button on toolbar and select Total.
4. Click Quarter column and click aggregate button on toolbar and select Total.

Here is a screenshot of a sample output, which i believe matches your requirement.

(http://www.imghype.com/data/2d35db3c90Crosstab%20column%20total%201.png) (http://www.imghype.com/viewer.php?imgdata=2d35db3c90Crosstab+column+total+1.png)

You can rename the totals column by specifying Report expression for Source type property and providing appropriate Report Expressions. The report expression for Quarter total column is 'Total Deviation for '+[Query1].[Quarter]
Title: Re: cross tab reports cloumns adding
Post by: bonniehsueh on 27 Jan 2009 10:06:01 AM
These were good detailed instructions Rajaggopal!
Title: Re: cross tab reports cloumns adding
Post by: Rajaggopal on 28 Jan 2009 02:30:41 AM
Thanks Buddy :)