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

Why won't this condiitonal filter work?

Started by jmills, 16 May 2012 01:56:40 PM

Previous topic - Next topic

jmills

I am using Report Studio and am trying to implement this 'Simple' filter, however am getting an incomatible data types Error.   Anyone know how to revise this?

CASE [Earnings Code]
  WHEN 'H1001' Then ([Current Amount])
  ELSE ([Current Amount] <> 0)
END

Gene

Are you looking for "0" in the else clause?  Can't mix integers and strings.

Maybe you mean the following:

CASE [Earnings Code]
  WHEN 'H1001'  Then ([Current Amount])
  ELSE (0)
END

You need to express what exactly you want the result to be under which condition and then write the when/else expression accordingly.

jmills

I have a list where the user would like to see all values in [Current Amount]when the Earnings Code = 'H1001', and for the remainder of the list, filter out zero amounts.

Lynn

You should write filter conditions as boolean expressions so you get a true or false result for each row....think of your filter expression as part of a "where" clause in SQL.

If I understood your requirement correctly, maybe this might be what you want.


[Earnings Code] = 'H1001'
or
( [Earnings Code] <> 'H1001' and [Current Amount] <> 0 )



jmills

I think that may just do it!

thanks Lynn.  :)