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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

Apply Map for Composite Key

Dear All

I have following tables

Table1 (Ratemaster)

Product Code

Batch No

NBR 

Table2 ( Batch Master)

product Code

Bath No

How to give appy map command for  ( Product Code + Batch No ) key combination.

Thanks

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.
4 Replies
Not applicable

try on this

Table1:

[Product Code] &'-'& [Batch No] as key,

[Product Code],

[Batch No],

NBR

from Table1;

Table2:

[Product Code] &'-'& [Batch No]  as key,

[Product Code],

[Bath No]

from Table2;

tresesco
MVP
MVP

map1:

mapping load

                   [Product Code]&[Batch No] as X,

                   Y      

From <>;

Then Something like:

Load

ApplyMap ('map1',   [Product Code]&[Batch No] ) as Mapped

jagan
Partner - Champion III
Partner - Champion III

Hi,

Concat the two strings (Product Code &  Batch No) and use the Mapping Load and ApplyMap() asusual.  The mapping Load table should contain only two columns.

RoomMaster:

Mapping LOAD

Product Code & Batch No AS Key,

NBR 

FROM Datasource1;

BatchMaster:

LOAD

Product Code,

Batch No,

ApplyMap('RoomMaster', Product Code & Batch No) AS NBR 

FROM Datasource2;

Hope this helps you.

Regards,

jagan.

Not applicable

example:

ApplyMap('Ratemaster', [Product Code] &'-'&[Batch No], 'Unknown') as NBR

I dont know if it works, but try