Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Null Handling

Hi All,

I have a column in excel with some white spaces present in some of the field values.

When I use isnull function, then it considers, white spaces as also not null.

Can we use some function which would also treat only white spaces entered in some of the field values as null?

Thanks,

Asma

4 Replies
giakoum
Partner - Master II
Partner - Master II

use isnull together with trim

if(isnull(trim(yourfield....

buzzy996
Master II
Master II

may be,tey tis way..

if(count(urfield)>0,urfield,isnull())

sory,use len instituted of count.

sunny_talwar

or you can try this as well

If(Len(Trim(yourField)) <> 0,....

and if you are using it in where clause, then like this:

Where Len(Trim(yourField)) <> 0;

jonathandienst
Partner - Champion III
Partner - Champion III

Check the length, as the length of a null is also 0. So instead of isnull:

     if(len(field) > 0, ....)

If the field could contain blanks, then

     if(len(trim(field)) > 0, ....)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein