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: 
vadim_grab
Creator
Creator

NullAsValue not working...Why?

Hello, All


I have tried all known to me solutions to reflect 'Null' for all Null value.

As result worked  only  this:  If(Len(Trim(city))=0,'Null',city) as city1

As you understand it's not the most elegant way. Maybe someone has penetrated this problem more deeply?

WHY?

I will be grateful for any comments and ideas!


Script code:

SET NullInterprete= 'Null';

SET NullDisplay= 'Null';

SET NullValue='Null';

NullAsValue city;


City:

LOAD

     city,

     If(Len(Trim(city))=0,'Null',city) as city1,

FROM

(txt, utf8, embedded labels, delimiter is ',', msq) ;


QlikView x64 Personal Edition - [D__Cloud Data Storage_OneDrive_QlikView Development_yelp-dataset.qvw_] 2018-04-20 12.27.50.png


16 Replies
tresesco
MVP
MVP

A quick try; spelling correction, remove extra 'e' may be.

SET NullInterpret= 'Null';

Chanty4u
MVP
MVP

try this also

NULLASVALUE *;

vadim_grab
Creator
Creator
Author

Thanks! It did not help

vadim_grab
Creator
Creator
Author

did not help! Thanks

tresesco
MVP
MVP

What are you exactly trying to achieve? 'Null' to be treated as real null() that should not appear in the listbox? I guess few of your null declarations are contradictory.

techvarun
Specialist II
Specialist II

NullasValue:

Mapping Load

Null(), 'Null'  AutoGenerate 1;

MAP City USING NullasValue;

You may try Map using statement

vadim_grab
Creator
Creator
Author

Pls, look at screenshot. City = City1 = 'Null'

tresesco
MVP
MVP

Sorry, I see that too. But I don't see what is not there, i.e. - that you want it to be like.

marcus_sommer

Your value isn't NULL else it contained any not visible/printable chars or is just empty which means something like: = '' and which is not NULL and therefore all the NULL features from Qlik won't work. In your case it's quite obvious within in your listbox because you could select this value - NULL instead wouldn't be displayed there and is also in other objects like tables not selectable.

Therefore your solution is a good one and very common. An alternatively to this might be an mapping-approach like this one: Filling Default Values Using Mapping | Qlikview Cookbook.

- Marcus