COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: jksahill on 27 Oct 2008 06:23:34 PM

Title: Calculation not returning expected result when using results from other columns
Post by: jksahill on 27 Oct 2008 06:23:34 PM
I have a calculation in my report that takes the results of column A (standard hours) / results of column  B (actual hours)  and I do not get the expected result.  The calculation that is incorrect is the one on the summary line - the detail lines work correctly.  I have the total defined as a calculation.  Any suggestions of why this is not working correctly?
Title: Re: Calculation not returning expected result when using results from other columns
Post by: blom0344 on 28 Oct 2008 05:31:45 AM
You probably need to force Cognos to take the proper order in the calculation. It needs to total the results for the first column , then perform the same for the second column and then perform the division for the summary, like:

total([fact1]) for report / total([fact2]) for report
Title: Re: Calculation not returning expected result when using results from other columns
Post by: Suraj on 29 Oct 2008 09:59:19 AM
In addition to suggestion above, you have to change/play with the aggregate and rollup aggregate properties to tell cognos how to aggregate the value.