Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

SET NullValue

Hello,

I do have some issues while trying to convert all values that are null to 'X'.

Also as I try checking if the field ISNULL I do receive FALSE(0). 

Then I tried to understand how could I transform empty cells to 'X' or null()?

IF(LEN(Field1) = 0, 'X', Field1) doesn't look like being the smartest way 🙂

Thank you!

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

You need to differ between the various types of NOTHING which aren't all NULL. Only data-bases and most of the programming tools know a real NULL and within common data-sources like Excel or csv not existing values are EMPTY/BLANK/MISSING but not NULL.

Therefore you couldn't query them with isnull(). Quite often it's not needed to replace each NOTHING with a real value (NULL has not only disadvantages else also benefits) else only from a few fields - and then script-queries like: if(len(trim()), ... are quite handy. If it should be really applied against many fields you may do it with a mapping like:

m: mapping load * inline [
L, R
, X
 , X
];

map F1, F2, F3 using m;

View solution in original post

4 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

I have read this already yet couldn't achieve any progress...

vikasmahajan

Hi,

if ( Len(Field1) =  0 or  isnull(Field1) ,1,0) as Nullflag 

use this Nullflag in your set analysis or reporing to avoid nulls.

Hope this help you.

 

Vikas

 

 

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
marcus_sommer

You need to differ between the various types of NOTHING which aren't all NULL. Only data-bases and most of the programming tools know a real NULL and within common data-sources like Excel or csv not existing values are EMPTY/BLANK/MISSING but not NULL.

Therefore you couldn't query them with isnull(). Quite often it's not needed to replace each NOTHING with a real value (NULL has not only disadvantages else also benefits) else only from a few fields - and then script-queries like: if(len(trim()), ... are quite handy. If it should be really applied against many fields you may do it with a mapping like:

m: mapping load * inline [
L, R
, X
 , X
];

map F1, F2, F3 using m;