Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

is not null?

Hello Community,

I am converting a report from BO into QV and in the SQL script there is "Field IS NOT NULL" in the if statement, is there a similar command in QlikView?

Thank you!

7 Replies

Re: is not null?

I assume this is as part of a where clause. In that case you can use WHERE len(trim(Field))>0.

talk is cheap, supply exceeds demand
Not applicable

Re: is not null?

It's in the select clause:

CASE WHEN ((Date1)<(Date2) OR (Date2) IS NULL) AND ((Date1)<(Date3) OR (Date3) IS NULL) AND (Date1) IS NOT NULL THEN 'Name' END,

Contributor III

Re: is not null?

you are stuck with If(Isnull(field)) or the len(trim(field)) > 0 that gysbert mentioned.

in general the len() one is better, since it hits more sources (excel is a good example) however, if you wanted the empty string (which is not really null) then do the isnull test.

Not applicable

Re: is not null?

Thanks for the replies. So using len:

If( ( Date1 < Date2 OR isnull(Date2) ) AND ( Date1 < Date3 OR isnull(Date3) ) AND ( len(trim(Date1)) > 0 ) , 'Name' )


Not applicable

Re: is not null?


and this way:






SQL select


     CASE WHEN ((Date1)<(Date2) OR (Date2) IS NULL) AND ((Date1)<(Date3) OR (Date3) IS NULL) AND (Date1) IS NOT NULL THEN 'Name' END;


     //from aTable;



Not applicable

Re: is not null?

Thanks, joschkoff2.

However, we create qvds from the database tables untouched and perform all the operations within the load script for the dashboard when bringing in the qvds.


Re: is not null?

WHERE NOT IsNull(field)

Community Browser