COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Janne on 22 May 2012 09:04:35 AM

Title: String Variable and percentage variance
Post by: Janne on 22 May 2012 09:04:35 AM
Hi,

I'm doing an string variable which shows me the "traffic lights" in profit and loss report:

if([Revenue].[% FCT] > [Revenue].[% ACT]) then ('red') else ('green')

The problem is that I need to put the percentage scale into that string variable function which we have in Excel. The calculation (Conditional formatting) in Excel goes like this: colum A3-colum B3>1% and this applies to the colum B3.

If someone understand what I was trying to explain and could help me then that would be great!  :)

\\Janne
Title: Re: String Variable and percentage variance
Post by: wyconian on 31 May 2012 10:58:02 AM
Hi

I think I just about understand what you're looking for.  I think you just need to change the condition in your variable to something like

if %FCT - %ACT > (%ACT*.001) then Green else Red

I'm assuming column A is %FCT, column B is %ACT and the 1% is percentage of %ACT, if that's not right change the condition.

You can do the same kind of thing in Cognos as you can in Excel (at least in this case).  You need to calcuate the difference between the 2 columns, then compare the result against 1% of a column.

Good Luck