Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Null if Len(Field) = 0

Hi,

I don't understand why, but in my table after loading, i can see values with " - " symbole and values empty...

Is it possible to set all values with " - " ?

Exemple :

Exmpl.jpg

Thanx

11 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

See this post

http://qlikviewcookbook.com/2013/01/filling-default-values-using-mapping/

for a suggested method of standardizing and converting your blanks to null(). Similar to Rupert's ApplyMap() suggestion but MAP USING can be easier to use when you have many fields.

-Rob

vishsaggi
Champion III
Champion III

As a Novice QV developer I usually handle nulls using the following

  • - First convert the missing values to Null
  • - Then replacing the Null Values to Desired Values.

- In the edit script 'Main tab' Set the variables as below

SET NullIntrepret = ''; // If loading data from Table files or Inline tables
SET NullDisplay ='';    // If Loading data using ODBC/OLEDB connections

Then using ISNULL or ALT functions to transform accordingly.

Eg Data:

NullHandledimg.png

Script:

Table1:
LOAD Dates,
Article,
if(IsNull(Article),'No Data',Article) AS [ifNullHandled],
Alt(Article,'NoValue') AS [AltNullHandling]
FROM

(
ooxml, embedded labels, table is Sheet1);

Any insights on the above will be much appreciated.