Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Null Values

Hi i have a table in that one field containing NULL Values on that place i want to show 'NULL' string in the table how can i do

can any one please help me.

8 Replies
tresesco
MVP
MVP

In the script:

NullAsValue FieldA, fieldB;

Set NullValue = 'NULL' ;

for details: NULL handling in QlikView

Not applicable
Author

Sorry can you please explain some more , i can't understated.

tresesco
MVP
MVP

Please have patience and go through the pdf you find in the provided link. That is a very nice and detailed document that teaches you all about NULL and how to handle them. Otherwise, post sample qvw with your query.

Not applicable
Author

In the above table i want to use the NULL string in the null value place

maxgro
MVP
MVP

from online help

The NullAsValue statement specifies for which fields the encountered NULLs should be converted to values.

By default, QlikView considers NULL values to be missing or undefined entities. However, certain database contexts imply that NULL values are to be considered as special values rather than simply missing values. The fact that NULL values are normally not allowed to link to other NULL values can be suspended by means of the NullAsValue statement.

The NullAsValue statement operates as a switch and will operate on subsequent loading statements. It can be switched off again by means of the NullAsNull statement.

The NullAsValue can be combined with the variable NullValue that specifies which string to use as NULL value. If the variable NullValue is not used, NullAsValue will replace NULLs with empty strings.

The syntax is:

NullAsValue*fieldlist

*fieldlist is a comma separated list of the fields for which NullAsValue should be turned on. Using * as field list indicates all fields. The wildcard characters * and ? are allowed in field names. Quoting of field names may be necessary when wildcards are used.

Example:

NullAsValue A,B;

Set NullValue = 'NULL' ;

Load A,B from x.csv;

before loading your table with null values in field FieldWithNull

NullAsValue FieldWithNull ;

Set NullValue = 'NULL' ;

Load

FieldWithNull ,

Field2,

.......

Fieldn

from .......;

a different way

Load

if(len(trim(FieldWithNull))=0, 'NULL',  FieldWithNull) as FieldWithNull,

Field2,

.......

Fieldn

from .......;

hope it helps

tresesco
MVP
MVP

Reload your application after adding those two lines in the script:

Screen Shot 06-02-14 at 04.05 PM.PNG.png

maxgro
MVP
MVP

with your data

LOAD

     ......

     if(len(trim([Functional Location]))=0, 'NULL',  [Functional Location]) as [Functional Location],

     if(len(trim(Capacity))=0, 'NULL',  Capacity) as Capacity,

     ....

FROM

     .....

     ;

Anonymous
Not applicable
Author

Go to Properties ->Presentation->Null Symbol->Replace '-' by 'NULL'