Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

How to replace a null value ?

Hey everyone,

When I load a table, there are some null values in a field. I use this field to perform a join. I would like to replace the null values by a string "Unknown" because otherwise I get some trouble with my join.

I have tried :

if( isnull(fieldA), 'Unknown', fieldA ) as FIELD_A,

but it doesn't do what I want.

Any idea ?

Thanks for your help

3 Replies

Re: How to replace a null value ?

if  ( not  len(fieldA) > 0, 'Unknown', fieldA ) as FIELD_A,

Valued Contributor III

Re: How to replace a null value ?

Try like:

if(len(fieldA)=0, 'Unknown', fieldA) as Field_A


Re: How to replace a null value ?

If(IsNull(fieldA) or Len(Trim(Replace(fieldA,'-','')))=0, 'Unknown',fieldA) as fieldA

Community Browser