Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Creator III
Creator III

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

This will work..

Thanks

Chaitanya

View solution in original post

6 Replies
ychaitanya
Creator III
Creator III

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

This will work..

Thanks

Chaitanya

sushil353
Master II
Master II

Hi,

try below code:

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

HTH
Sushil

its_anandrjs

Try with

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

Or

If( Not IsNull(fieldname), do this )

Regards

Anand

amit_saini
Master III
Master III

Try this:

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

Thanks,

AS

anbu1984
Master III
Master III

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

Not applicable
Author

Thanks , that worked perfectly !