COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: giovanni.lucarelli on 27 Jan 2009 07:55:16 AM

Title: Report Studio - total
Post by: giovanni.lucarelli on 27 Jan 2009 07:55:16 AM
ciao,


can samebody help me?

I have this report:

                              2002  2003    2004    total
Africa   inhabitants:   10     30        20       60
           average age: 45,6  45,7     39,8     XXXX


where inhabitants and average age are two measures.

well ... who knows how to write avg (45,6  45,7  39,8) in the XXXX cell I don't want the total but the average.


thanks very much....I hope that u can help me...
Title: Re: Report Studio - total
Post by: lebronjames on 29 Jan 2009 03:42:41 PM
Well, the aggregate function should include average as a dropdown option. If you just click on the measure that you want to average and click it, it will work.

If this is not possible for some reason, then click on the xxxx cell alone. Then on the Properties, change the aggregate function to calculation and make the expression: average(currentMeasure within detail [Inhabitants or whatever your measure is called]).

Hope this helps.