COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: pooja on 19 Nov 2008 09:20:09 AM

Title: binary
Post by: pooja on 19 Nov 2008 09:20:09 AM
we have data field called [New Index rate].
and we have another fiels called [BLINTERESTROUND] which is integer.it has only two binary no either -1 or 0.
here we have to display the value of [New Index rate] under these case
1) if [BLINTERESTROUND] is 0 then just a [New Index rate]
2)  if [BLINTERESTROUND] is -1 then just a 1/8th of
[New Index rate]
could you please help me out
pj
Title: Re: binary
Post by: lindero on 19 Nov 2008 10:32:23 AM
try the case statement with

case
when [field] = 0 then [rate]
when [field] = -1 then [rate]/8
else null
end


Title: Re: binary
Post by: Suraj on 19 Nov 2008 10:39:07 AM
May be this does for -1.
case
when [field] = 0 then [new index rate]
when [field] = -1 then ([new index rate]/8)
else null
end