COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Sep2013 on 20 Nov 2012 08:07:29 PM

Title: Name
Post by: Sep2013 on 20 Nov 2012 08:07:29 PM
Hi I have a requirement to use preferred ame if it is not null else use first name in my current report.
I am trying to create a new data item with following expression:
IF [Pref Name] IS NULL THEN [First Name] ELSE [Pref Name]

But it give me error 0459.
Please help me resolve the issue
Title: Re: Name
Post by: HalfBloodPrince on 20 Nov 2012 11:20:11 PM
Try this
IF ([Pref Name] IS NULL )THEN ( [First Name]) ELSE ([Pref Name])

or try coalesce function as coalesce ([Pref Name] ,[First Name])
Title: Re: Name
Post by: Sep2013 on 22 Nov 2012 09:42:16 PM
Works :):):)
Thanks