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

IF Statement in Report Studio filter

Started by annoyed, 28 Aug 2009 03:43:25 PM

Previous topic - Next topic

annoyed

Hello,

I am trying to filter out values similar to a prompt within the 'filter' section of a report studio query.  I have also tried adding this as a data item w/i the query, no luck.

I'd appreciate any input...

Here's an example of my statement:

IF (Country Code] = 'ABC') THEN (Currency Code = 'DEF' )

ELSE
(

IF (Country Code] = 'GHI') THEN (Currency Code = 'JKL' )
ELSE
      (
         IF (Country Code] IN ('MNO','PQR','STU')) THEN (Currency Code = 'VWX' )
         ELSE (NULL)
))


thanks

DustPanMan

Since you are always looking at CountryCode, it is best to use Case... When logic.

Case ([CountryCode])
When 'abc' Then 'def'
When 'ghi' Then 'jkl'
Else 'mno'
End

Let me know if this works.
Best,

D

billylodz

create new Item with this case or if, and this Item use in filter