If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Report Condition - IF Statement

Started by juffin, 21 Oct 2013 02:04:00 PM

Previous topic - Next topic

juffin

Hi,
I'm writing a report condition in Report studio as below.
My logic is if month = 1,2,3, or 4 then keep the same month else put month as 9

IF ( [Query1].[CONVERSION_MONTH]) < '5' THEN
    ( [Query1].[CONVERSION_MONTH] )
ELSE
    ( [Query1].[CONVERSION_MONTH] = '9' ) END

but i am getting a parsing error - RSV-VAL-0034 Failed to validate the variable

Anyone has any clue on what the issue is ?
Thanks in advance.
Regards
Jf

sir_jeroen

remove END...
It's IF.. THEN ELSE...
and
CASE WHEN... THEN... ELSE ... END

HalfBloodPrince

 ( [Query1].[CONVERSION_MONTH] = '9' ) is causing error.

create new query calculation  with name Conversion month 9 as if( [Query1].[CONVERSION_MONTH] = '9' ) then ([Query1].[CONVERSION_MONTH] ) else ('')

then
IF ( [Query1].[CONVERSION_MONTH]) < '5' THEN
    ( [Query1].[CONVERSION_MONTH] )
ELSE
    ( [Query1].[Conversion month 9] )

Satheesh

hi
write the Condition like below




IF ( [Query1].[CONVERSION_MONTH] < '5' ) THEN
    ( [Query1].[CONVERSION_MONTH] )
ELSE
    ('9' )

juffin