COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bonniehsueh on 31 Jul 2008 03:45:58 PM

Title: How do you aggregate multiple aggregates?
Post by: bonniehsueh on 31 Jul 2008 03:45:58 PM
I want to total 3 other aggregations within a crosstab using a olap data source.

Aggregate(currentMeasure within set (Total A, Total B, Total C)) but I get the error Invalid coercion from 'value' to 'member.

The inner rows are sets of data set like set(attribute 1,attribute 2, attribute 3)
The Row edge come from the hierarchy, but do not contain the correct sums for this detail so I can't use (current Measure within set Row Edge)
Total A, Total B, Total C are aggregates of sets of data within the crosstab.

What is the syntax to achieve this?
Title: Re: How do you aggregate multiple aggregates?
Post by: bonniehsueh on 04 Aug 2008 09:02:18 PM
Got It. Total's A, B, C were aggregates so the results of them were 'values' of the aggregate and not a 'set of members' which is what was needed in order to use the member summary aggregate(currentMeasure within set...).

Correction to above statement. Aggregting 'individual members' uses different syntax Aggregate(CurrentMeasure within set set([Set A], [Set B], [Set C])). The below solution is for aggregating Sets of members.

Solution:
Aggregate (CurrentMeasure within set [Set A], [Set B], [Set C])

Woila!