COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: utathyaghosh on 19 Nov 2012 01:51:18 AM

Title: query calculation
Post by: utathyaghosh on 19 Nov 2012 01:51:18 AM
hi,
i want to calculate the diff in revenue in 2006 and 2007 using query calculation.
how can i achieve it???
Title: Re: query calculation
Post by: blom0344 on 20 Nov 2012 02:09:43 AM
total
(
case when [year] = 2007 then [revenue] else 0 end
)
-
total
(
case when [year] = 2006 then [revenue] else 0 end
)

set the aggregate of the calculation to 'calculated'.