COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: chris2001dc on 06 Feb 2009 11:23:33 AM

Title: Aggregate function
Post by: chris2001dc on 06 Feb 2009 11:23:33 AM
Hi, this is my problem:
I need an item that contains the total of just some elements, I can get the informaton this way:
                         Jan
----------------------
|       | Ag A       |2   |
|North| Ag B       |2   |
|       | Ag C       |3   |
|       | Total Ag  |7   |
-----------------------
|        | Ag E      |8   |
|South| Ag F      |4   |
|        | Ag G      |2   |
|        | Total Ag |14  |
-----------------------

But i need a report like this:
                Jan       
--------------------
|   North  |   7   |       
|   Ag A   |   2   |
|   Ag B   |   2   |
|   Ag C   |   3   |
----------------|
|   South  |  14  |
|   Ag E   |    8  |
|   Ag F   |    4  |
|   Ag G   |    2  |
-----------------

What formula should I use in the data item to have the view described above?

Thanks for your help
Chris
Title: Re: Aggregate function
Post by: Rajaggopal on 11 Feb 2009 12:32:12 AM
Try Total([Data item] For [Region]) where [Region] is the data item of North, South, etc...
Please let us know if that worked for you...
Title: Re: Aggregate function
Post by: chris2001dc on 16 Feb 2009 11:03:17 AM
Thanks for your answer, but it didn't worked