COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: intrepid402 on 02 Jan 2015 12:53:20 PM

Title: Crosstab percentage average [Solved]
Post by: intrepid402 on 02 Jan 2015 12:53:20 PM
Hi Devs!
Happy new Year!

I am having an issue where in crosstab I need to display average of percentage instead of Sum. In the columns we have revenue and percentage. Revenue needs to be summed in the "total" row but Percentage needs to be averaged, what do you think is the best way of achieving this? Please see the attachment

Thank you
Title: Re: Crosstab percentage average
Post by: ToriBurns on 05 Jan 2015 01:16:55 AM
Hi Ram,

I don't know how you compute the average of percentage but you can set the define contents of the cell where you pointed the arrow (on the image you attached) to "Yes". Then, drag a text item inside that cell. Select the text item that you dragged. Then, on properties under text source section, set the source type to report expression. On the report expression, set your formula to compute the average of percentage.

Hope it helps. :)

Cheers! :D
Tori
Title: Re: Crosstab percentage average
Post by: intrepid402 on 05 Jan 2015 01:29:59 PM
Hi Tori,
I was going for kind of method you were suggesting, however, there was an easier approach...
I changed the rollup and regular aggregate to "calculated" for the data items that were percentages. On the crosstab, when I selected the percentage and clicked on the summarize button, I was able to get averages for percentages and total for amounts.
A much easier and straight forward solution!
Title: Re: Crosstab percentage average [Solved]
Post by: ToriBurns on 06 Jan 2015 12:08:16 AM
Hi Ram,

Good to hear that. Thanks for the info and for reminding me of the easier approach. I used the one that I suggested to you because I have a special condition on the percentage and I have to set a conditional formatting exclusive for that column. Hehe.
Thanks again. :D

Tori