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

If Statement on NULL field

I have a table called updatedb and in that table is a field called udsource and udindex.  In my load script I want to create an IF Statement so if the udsurce is NULL and then udindex = '0' then it outputs the text Web

My Statement so far is =if(udsource = '' and udindex = '0', 'Web').  However I cannot pull out the NULL value from the udsource and the load script will not let me put in isnull. 

At some point I will need to expand the script so if udsource = 'E-mail' and udindex = '0' then the text is E-mail, so hopefully you can answer this question for me too.

Regards,

Jon Ditchfield

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try: if( len(trim(udsource)) = 0 and udindex = 0, 'Web', if(udsource='E-mail' and uindex = 0, 'E-mail' ))


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Try: if( len(trim(udsource)) = 0 and udindex = 0, 'Web', if(udsource='E-mail' and uindex = 0, 'E-mail' ))


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for your help on this one, it is exactly what I needed.