COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: deepak2k2 on 08 Nov 2010 08:46:40 AM

Title: Finding difference
Post by: deepak2k2 on 08 Nov 2010 08:46:40 AM
Hi,

I've a table to find the difference of (Oct-Sep) month.   Used 2 data items to calculate (A/B) and (Oct-Sep) and I'm getting correct result except the last cell (which is highlighted).

I should get the result as -8 (Oct = 2 & Sep = 10).   But I'm getting as -3.3.
   Oct   Sep   Oct-Sep
A   100   200   -100
B   50   20   30
A/B   2   10   -3.3

Can anyone let me know how to get the expected result?

Title: Re: Finding difference
Post by: CognosPaul on 08 Nov 2010 08:59:13 AM
The problem you're having is with the solve order.

The crosstab is defaulting to calculating the columns first, and the rows second. So it understands A/B to be -100/30.

You can fix this by clicking on the Oct-Sep data item in the query and setting the Solve Order to something higher than the A/B data item. (Try setting it to 99).
Title: Re: Finding difference
Post by: deepak2k2 on 08 Nov 2010 09:12:49 AM
Thanks a lot for your quick response.. It solved my problem.

If I give the solve Order as 1, its working fine.  Any specific reason to give the solve order as 99?
Title: Re: Finding difference
Post by: CognosPaul on 08 Nov 2010 09:18:35 AM
I suggested 99 because I don't know the structure of your report. When you click on the total button Cognos will automatically assign a solve order. 99 was just a number high enough to be sure it would work.