Author Topic: Question about percentage  (Read 618 times)

Offline lil

  • Associate
  • **
  • Posts: 2
  • Forum Citizenship: +0/-0
Question about percentage
« on: 22 Oct 2009 10:00:14 am »
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!
« Last Edit: 22 Oct 2009 10:05:13 am by lil »

Offline Thundercat

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Re: Question about percentage
« Reply #1 on: 27 Oct 2009 08:59:59 pm »
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.

 ;)

Offline lil

  • Associate
  • **
  • Posts: 2
  • Forum Citizenship: +0/-0
Re: Question about percentage
« Reply #2 on: 28 Oct 2009 07:43:48 am »

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