COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: lil on 21 Oct 2009 11:00:14 PM

Title: Question about percentage
Post by: lil on 21 Oct 2009 11:00:14 PM
Hi,

I just started using cognos a week ago and I have been trying to come up with a similar report. Could you advise me how I can compute for the percentage in a crosstab report similar to the sample below.
---------------------------------------------
         Q     %   
---------------------------------------------
Total(A)      100   100(formula: (Q/Total(A))*100)
A1
   Total(B)   40   40  (formula: (Q/Total(A))*100)
   B1          10      25     (formula: (Q/Total(B))*100)
   B2          12      30     (formula: (Q/Total(B))*100)
   B3         18      45     (formula: (Q/Total(B))*100)
A2
   Total(B)   60   60  (formula: (Quantity/Total(A)*100)
   B1         15      25     (formula: (Quantity/Total(B))*100)
   B2         21      35     (formula: (Quantity/Total(B))*100)
   B3         25      40     (formula: (Quantity/Total(B))*100)
---------------------------------------------

Thanks a lot!
Title: Re: Question about percentage
Post by: Thundercat on 27 Oct 2009 09:59:59 AM
Hi Lil, iv'e also just started using Cognos, to do the percentage calculation  you need to add in total rows and then make a data item in query explorer. You can then add in a Calculated member to your crosstab and create the formula using the data items. you don't need to multiply by 100 as you can just set the format to percentage for the column.

;)
Title: Re: Question about percentage
Post by: lil on 27 Oct 2009 08:43:48 PM

Thank you Thundercat I'll work on it and follow your instructions  :)