Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rathnam_qv
Creator
Creator

Nuul as Others

Hi All,

I have two fields one is coming from database and the second one coming from Excel. Joining these two using code and pulling these two fields into Table. For field1 there are few nulls in field2.

I want to assign those nulls as Others in the field2. How to achieve it?

PFA image.

Thanks,

Rathnam.

8 Replies
Ivan_Bozov
Luminary
Luminary

Hello! Perhaps something like: If(IsNull('Field2'),'Others','Field2')

vizmind.eu
rathnam_qv
Creator
Creator
Author

Hi Ivan,

Thanks for your Time.

I tried that but not working.

Thanks,

Rathnam.

sasiparupudi1
Master III
Master III

Try

If(Len(trim(('Field2'))=0,'Others','Field2')


or post some sample data or a sample app


hth

Sasi

Ivan_Bozov
Luminary
Luminary

Okay, I just checked and it works if the tables are joined in the script. Small example below:

Script:

Example:

Load

Supplier,

Country

Inline

[Supplier,Country

A,China

B,Japan]

(Delimiter is ',');

Outer Join Load

Supplier,

Code

Inline

[Supplier,Code

A,CN]

(Delimiter is ',');

Sheet:

Table.PNG

vizmind.eu
Not applicable

Hi Rathnam,

If you use these two tables auto link together, like this:

2017-08-11_161415.png

Then you can try the following expressions, these two both work effectively.

if(aggr(isnull(Field_B),Field_A),'Other',Field_B)

or

if(aggr(len(Field_B),Field_A)=0,'Other',Field_B)

2017-08-11_161614.png

Regards,

Nina

rathnam_qv
Creator
Creator
Author

Hi Nina,

Thank you very much.

This is Exactly working as i expected. To give Correct Answer i am not seeing that option in Actions so, i gave Helpful.

Thank u once again.

Rathnam,

Chanty4u
MVP
MVP

try this in dim

if(IsNull(filed),Dim)

Not applicable

Hi Rathnam,


My pleasure!


Nina