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

Apply map()

Hi Everyone ..

I'm having two tables

Tab1:

Itemfamilycode

,Itemcode

Tab2:

Itemcode

,sale

,date

,branch

Now i want to get itemfamilycode into tab2

so using applymap() like below syntax

Tab1:

Mapping Load

Itemfamilycode

,Itemcode

Tab2:

Itemcode

,applymap('Tab1',Itemcode) as Itemfamilycode

,sale

,date

,branch

But Itemcode able to get in place of Itemfamilycode


any help in getting Itemfamilycode into tab2


Regards,

Kakani.

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

It's the other way around, in the MAPPING table always put first the value to be looked up, in this case, Itemcode, and the second, the value you want to have returned, in this case, Itemfamilycode. If there is no match, then the original Itemcode will be displayed. To avoid it, you can use a third parameter in ApplyMap()

ApplyMap('Tab1', Itemcode, 'N/A') AS Itemfamilycode

If Itemcode does not have a match in Tab1, the field will store "N/A" instead.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

It's the other way around, in the MAPPING table always put first the value to be looked up, in this case, Itemcode, and the second, the value you want to have returned, in this case, Itemfamilycode. If there is no match, then the original Itemcode will be displayed. To avoid it, you can use a third parameter in ApplyMap()

ApplyMap('Tab1', Itemcode, 'N/A') AS Itemfamilycode

If Itemcode does not have a match in Tab1, the field will store "N/A" instead.

kakani87
Specialist
Specialist
Author

Yes the mistake I'm doing is putting lookup field in the send row

thank you for correcting me