Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Apply Map

Hello

I am trying to do an apply map please tell me how do I use apply map correctly.

Table1:

Load

ID,

Field2,

Field3

;

Table2:

Load

Name,

Field4,

Field5

;

I am trying to do an applymap to map the ID in Table1 to the Name in Table2.

Please suggest applymap code for the above scenario.

Thanks

5 Replies
Anonymous
Not applicable
Author

so are you trying to map individual id to a name? applymap needs a mapping load of a table with two fields, first one of which should have the same values as your field in a table so QV knows what field to map with what field and based on which value.

Not applicable
Author

Hello Saradhi

Here let me explain again

Now I have modified it as you told me. Please tell me how to do the applymap now.

Hello

I am trying to do an apply map please tell me how do I use apply map correctly.

Table1:

Load

ID,

Field2,

Field3

;

TableMap:

Mapping Load

Name,

New ID

;

Table2:

Load

Name,

New ID,

Field5

;

Anonymous
Not applicable
Author

so in table 2:

load
     Name,

     Applymap('TableMap',Name, 'No ID or 0000') as New ID,

     Field 5,

     . ..

from ....

;

the third parameter is Applymap function is optional and is for instances where there is no corresponding Name value in TableMap. hope this helps.

Anonymous
Not applicable
Author

i also noticed that you posted the same issue twice...may have been an unintended mistake...but please consolidate and do not repost.

Not applicable
Author

Hello Saradhi

Here is my code for Table 1, mapping table and table2

Let me know if its correct

Table1:

Load

;

sql select * from T1;

SOBMap:

Load

NAME as ,

SET_OF_BOOKS_ID as ,

;

SQL SELECT *

FROM T2;

SOB:

Load

CHART_OF_ACCOUNTS_ID as ,

CURRENCY_CODE as ,

SHORT_NAME as ,

APPLYMAP('SOBMap',[SOB Name],[SOB ID]) as

;

SQL SELECT *

FROM T2;

Store SOB into SOB.qvd(qvd);