COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: charon on 11 Sep 2012 04:50:10 PM

Title: [solved] calculate with fact calculations and sets
Post by: charon on 11 Sep 2012 04:50:10 PM
Hi Everybody,

the dimensional functions in cognos declared war on me..AGAIN. :D

Thats the situation: I have created a set with custom groups in RS 10, based on a DMR Model.
The set are the rows of my crosstab. The colums are different facts, some native facts from the table, some are calculations.
What i need now is the aggregation, means for revenue e.g. i need a sum over all revenue facts for this set. thats easy and works well.
BUT: in a second step, i need to work with these results, in this case sum of fact 1 and all the set members.

Example:
                                      Fact 1                   Fact 2                             Fact x...
SET i
->           member 1        abc                       cde                                    ...
->           member 2        cba                       edc                                    ...
-------------------------
             aggregation   abc+ cba              cde+edc         ( sum fact1-sumfact2)/ sum fact 1


the fact x is a percentage.

How can i realize that? Ive tried different dim functions like "tuple(set i;currentmeasure)) or tuple (set i; factx), but didnt receive the correct data. also, ive tried different aggregation modes.

Help is appreciated a LOT :S
thx and cheerz
charon
Title: Re: calculate with fact calculations and sets
Post by: tjohnson3050 on 11 Sep 2012 05:56:17 PM
For the total row, use the function aggregate(currentMeasure within set (set(member 1, member2))

Title: Re: calculate with fact calculations and sets
Post by: charon on 12 Sep 2012 01:44:41 AM
Thx for the reply TJohnson,

but the main issue is not to aggregate, but to work with the aggregated results from that total row.
It has a total for fact 1, total fact 2, and the 3. column should be calcaulation basesd on the both further totals...

any further ideas ? :D
Title: Re: calculate with fact calculations and sets
Post by: tjohnson3050 on 12 Sep 2012 08:45:25 AM
On the calculated measure, make sure that the aggregation type is set to calculated.  This will re-apply the calculation with the aggregated values of the data items in the calculation.
Title: [solved] Re: calculate with fact calculations and sets
Post by: charon on 12 Sep 2012 09:07:54 AM
you sir, are a GENIUS.

of course i know this setting from the cog612 course, but ive never used it b4.
thx a lot tjohnson, u made my day :D

issue solved.
Title: Re: [solved] calculate with fact calculations and sets
Post by: tjohnson3050 on 12 Sep 2012 11:12:18 AM
Glad I could be of help.  Your applause is much appreciated :)