Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pnvenkat
Contributor III
Contributor III

Applymap for Null values after Qlik join

I'm trying to figure out how to replace the '-' that comes for empty null values after joins. After joining two tables, my data looks like this:

ID                    Object_1                Object_2

1                         -                              Apple

2                        Orange                Banana

3                        Grapes                 -

I would like to replace all the '-' with 'Null' so that they can be searched using a filter pane.

Labels (2)
4 Replies
formosasol
Partner - Contributor III
Partner - Contributor III

Hi,

Can you provide sample date please.

Regards
Frank
nagaiank
Specialist III
Specialist III

Did you try the following script to replace '' with NULL ?

test:
load ID,If(len(trim(Object_1))=0,'NULL',Object_1) as Object_1
,If(len(trim(Object_2))=0,'NULL',Object_2) as Object_2;
load * Inline [
ID, Object_1, Object_2
1,,Apple
2,Orange,Banana
3,Grape,
];

Vegar
MVP
MVP

Before creating your tables add this script:

NullAsValue Object_1, Object_2;
Set NullValue = 'Null';

It will present all null values in the two fields as 'Null'.
pnvenkat
Contributor III
Contributor III
Author

This half works! it works for Object_1, but not Object_2.