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: 
danm84306
Contributor III
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
Specialist II
Specialist II

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...

View solution in original post

5 Replies
MK_QSL
MVP
MVP

You can deal as below

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

Gysbert_Wassenaar

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
Specialist II
Specialist II

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...

IAMDV
Luminary Alumni
Luminary Alumni

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
Contributor III
Contributor III
Author

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.