COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gatorfe on 21 Jul 2014 01:24:05 PM

Title: Percentages on Crosstab
Post by: gatorfe on 21 Jul 2014 01:24:05 PM
We are working on a simple crosstab(pic attached) but having an issue trying to get a percentage to work.  We want to add a new column that includes the % by category for each month.  So for the 1st row of the cross tab where the category is blank the percentage should be .862 (10169/11791).  The category DRP should be .013(154/11791).  We see in the query the total fields per month and per order source(pic attached).  How can we create the calculation we are looking for?  Thanks in advance for any suggestions. 
Title: Re: Percentages on Crosstab
Post by: BigChris on 22 Jul 2014 03:10:40 AM
Have you tried a calculation that's something along the lines of:

total ([Order No] for [Order Source]) / total ([Order No] for report)

There are probably more elegant ways to achieve the same thing though...
Title: Re: Percentages on Crosstab
Post by: gatorfe on 22 Jul 2014 09:29:54 AM
Thanks Big Chris!