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

Filter error

Started by perspolis09, 25 Jul 2013 02:48:02 PM

Previous topic - Next topic

perspolis09

Hi,

if event_code in (sag, sur) and phase is null then "puuttuu" else phase

why do I get error, What should change the filter?


BigChris

You can't have an if...then...else statment in a filter. You're statement isn't very clear...what are you comparing to "puuttuu" or phase?

MFGF

Quote from: perspolis09 on 25 Jul 2013 02:48:02 PM
Hi,

if event_code in (sag, sur) and phase is null then "puuttuu" else phase

why do I get error, What should change the filter?

This looks very much like the expression to return a value for a calculation. Is that your intent?  Expressions for filters need to return a result which is true or false (so that each row is either included in or excluded from the query result set).

eg

if ([event_code] in ('sag', 'sur') and [phase] is null) then ([another column] = 'puuttuu') else ([another column] = [phase])

My expression will return one of two possible results to the filter - either

[another column] = 'puuttuu'

or

[another column] = [phase]

Both of these are expressions which will either evaluate to TRUE or FALSE when evaluated at runtime

Cheers!

MF.
Meep!

perspolis09

thanks this help me a lot! :)