Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

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
Highlighted
MVP & Luminary
MVP & Luminary

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

Highlighted
Not applicable

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