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

Default values for data items in query

Started by niahanth, 19 Jan 2016 11:33:42 PM

Previous topic - Next topic

niahanth

I have a data item in a report in which i should display either paying or not-paying. There are some predefined conditions when i should display paying and when not paying. If the conditions are met the column should display paying or not paying in the report. Can anyone tell how to write the query to display paying or nonpaying in the report.

Thanks

schrotty

Hi,

Do you have more informations for us?
Is your model relational or dimensional / DMR ?
List- or crosstab-report?

Maybe the solution is only to create a Data-Item with an Expression like this:
if (1=1) then ('paying') else ('non-paying')

Schrotty

BigChris

You can either use an if...then...else condition, or you can use a case statement. If it's a simple set of conditions I'd use the if...then...else, but if it gets complicated I tend to use case

if([Customer] = 'Brian') then ('Paying') else ('Non-Paying')

Case
When [Customer] = 'Brian' and [Invoice_Value]>0 then 'Paying'
When [Customer] = 'Brian' and [Invoice_Value]<=0 then 'Non-Paying'
else 'Paying'
End