COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: nbailey on 02 Apr 2012 07:56:20 AM

Title: Simple Percentage in CrossTab
Post by: nbailey on 02 Apr 2012 07:56:20 AM
I am trying to create a simple percentage row as the bottom row of my Cross tab report.  my measure is a count of students for each of 7 colleges for a single year.   I have created a total column to the right totally all 7 colleges.   I am trying to add a row at the bottom of the report that show what percentage each college is of the total to the right. 


                      WMCC RVCC NHTI  LRCC  MCC  NCC  GBCC    Total
Tot Enroll         1215 1349  5073 1684  3760 2650  2599    18330
percentage         ??     ??       ??      ??       ??     ??      ??


I have tried several different things and nothing seems to work.   this is single query reprort that looks like what is in the attatchment...where pidm_key is my measure using count distinct. 

any help would be greatly appreciated...


Title: Re: Simple Percentage in CrossTab
Post by: colt on 02 Apr 2012 09:15:42 AM
Expect [Dat1] Dataitem, that contains set WMCC to GBCC.
[TotEnroll]= YourMeasure
[Total]=Total(currentmeasure within set [Dat1]

==> [percentage]=[TotEnroll]/[Total]

Of course you have to format the result as percentage.
Maybe you also have to deal with Solve Order.
In my test i have set Solve Order for [Total] to 10 and Solve Order for [percentage] to 20.
Title: Re: Simple Percentage in CrossTab
Post by: nbailey on 02 Apr 2012 10:14:24 AM
Thank you Very much... that worked ... the solve order was what I was missing in all my previous attemps...

see enclosure for final report ...

Thanks again