Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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

Re: If Statement on NULL field

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
2 Replies

Re: If Statement on NULL field

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

Re: If Statement on NULL field

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

Community Browser