Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to write if statement with not NULL ?


Hello,

I have a field , from a SQL database that I would like to IF against :

If (fieldname NOT NULL, do this )

How would  I write this like above, but correctly ?

1 Solution

Accepted Solutions
ychaitanya
Contributor III

Re: How to write if statement with not NULL ?

if( isNull('Fieldname'),'null conditon','not null conditon');

This will work..

Thanks

Chaitanya

6 Replies
ychaitanya
Contributor III

Re: How to write if statement with not NULL ?

if( isNull('Fieldname'),'null conditon','not null conditon');

This will work..

Thanks

Chaitanya

sushil353
Honored Contributor II

Re: How to write if statement with not NULL ?

Hi,

try below code:

If(not isnull(filedname) ,1,0)

HTH
Sushil

Re: How to write if statement with not NULL ?

Try with

If( IsNull(fieldname) = 0, do this )

Or

If( Not IsNull(fieldname), do this )

Regards

Anand

amit_saini
Honored Contributor III

Re: How to write if statement with not NULL ?

Try this:

=if (not isnull(Plant_ShortName),Plant_ShortName & ' - ' & Plant_FullName)

Thanks,

AS

anbu1984
Honored Contributor III

Re: How to write if statement with not NULL ?

If (IsNull(fieldname> <> -1, 'do this' )

Not applicable

Re: How to write if statement with not NULL ?

Thanks , that worked perfectly !

Community Browser