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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

not Null and not Blank

hi all,

I have a column coming from a table with nothing on some rows.. I wasn't able to find out if the value is null, blank..or what is it.

I tried

if(len(trim(MyField))=0,1,0)

if(isnull(MyField)>0,1,0)

if(MyField=Null(),1,0)

if(MyField='' ,1,0)

if(MyField=' ' ,1,0)

none of the above gave me 1 as a result when trying to switch the value on the script side..

the following worked when trying to test through the UI  if(MyField='' ,1,0) and returned 1 but i need it to work on the script..

Any idea on what is nothing could be?

Best,

Alec

1 Solution

Accepted Solutions
alec1982
Specialist II
Specialist II
Author

I found the issue........... it is a concatenate of two tables on my script and I was trying with the top part while the issue on the second part of the concatenation..

View solution in original post

12 Replies
maxgro
MVP
MVP

not len(trim(MyField))=0

sunny_talwar

This may still not work, but just curious if this helps:

if(Len(Trim(MyField))=0,1,0)



Best,

Sunny

sunny_talwar

=If(Len(Trim(MyField))=0,1,0)

alec1982
Specialist II
Specialist II
Author

That's what I used but it didnt work too..

sunny_talwar

Would you be able to share a sample?

Best,

Sunny

alec1982
Specialist II
Specialist II
Author

I am unable to share it..

sunny_talwar

Why not try them all at once?

If(Len(Trim(MyField)) = 0 or IsNull(MyField) or Trim(MyField) = '', 1, 0)

Sunny

alec1982
Specialist II
Specialist II
Author

Please find attached the qvw..

sunny_talwar

I don't see anything attached.