Qlik Community

New to Qlik Community

Discussion board for questions on how to use Qlik Community and its features.

Announcements
This forum is for questions and information about how to use the Qlik Community.
Please do not post product related questions here.
Select the correct forum from: Qlik Product Forums
danm84306
New Contributor III

Mark all Null in a field as a value


Hello,

     I am looking to mark all Null in only one field as a value. I added the NullasValue to my script but it marked all Null as a value. I am only looking to mark only one field Nulls as a value.

1 Solution

Accepted Solutions
israrkhan
Valued Contributor II

Re: Mark all Null in a field as a value

you can try like

NullAsValue FieldName;

then it will mark null as value only in this field,

if you use

nullasvalue * mean all fiels,

NullAsValue Field1,Field2

only in these two fields...

see in the help file...

5 Replies
MVP
MVP

Re: Mark all Null in a field as a value

You can deal as below

IF(IsNull(YourFieldName) or len(trim(YourFieldName))=0,'Unknown', YourFieldName) as YourFieldName

Re: Mark all Null in a field as a value

Try an if statement:

LOAD

     fieldA,

     fieldB,

     if(len(trim(fieldC))=0, 'MyValue', fieldC) as fieldC

     fieldD,

     ...

FROM ...


talk is cheap, supply exceeds demand
israrkhan
Valued Contributor II

Re: Mark all Null in a field as a value

you can try like

NullAsValue FieldName;

then it will mark null as value only in this field,

if you use

nullasvalue * mean all fiels,

NullAsValue Field1,Field2

only in these two fields...

see in the help file...

Luminary
Luminary

Re: Mark all Null in a field as a value

Hi Dan,

You can check the following video post on my blog:

http://qlikshare.com/qlikview-video-tutorial-convert-null-values-selectable-strings-qlikview/

I hope this helps!

Cheers,

DV

danm84306
New Contributor III

Re: Mark all Null in a field as a value

Thank you very much, this was the answer i was looking for. I did have * and did not put two and two together. Great job! Thank you again.

Community Browser