COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: CognosVN on 10 Oct 2012 02:26:21 AM

Title: accumulated amount value between 2 months
Post by: CognosVN on 10 Oct 2012 02:26:21 AM
I'd accumulated amount between 2 values ​​(for example, 6/2011 to 5/2012) in the first column (A) and 1 is the value amount of the previous year (B) (6/2010 to 5/2011) and 1column is an A / B!
please suggest me solutions or rational function
thanks and rgds.
Title: Re: accumulated amount value between 2 months
Post by: blom0344 on 10 Oct 2012 04:02:43 PM
It is called a division and it merely involves defining the quotient of the 2 dataitems, or if you want to put it into 1 expression:

total(case when [somedate] between .... and .... then [somevalue] else 0 end) /
total(case when [somedate] between .... and .... then [somevalue] else 0 end)

set the aggregate type of this dataitem to calculated..