Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Is column name need to be same in ApplyMap() and Mapping table?

Hi,

I am using the below code:-

MAP2:

Mapping

load Distinct

  "D_TERRITORY.Terr Key",

  [Terr Regn Mgr Last Name]

resident [D_TERRITORY];

now my F_SALES_TRN_TERR_LIST table has F_SALES_TRN_TERR_LIST.Terr Key column and I am using the below code on that key:-

LOAD

[Trn Terr List Key],

ApplyMap('MAP2',"F_SALES_TRN_TERR_LIST.Terr Key") as "Terr Regn Mgr Last Names",

ApplyMap('F_SALES_TRN_Temp',"Trn Key") as "Firm Channel Desc"

resident [F_SALES_TRN_TERR_LIST];

now my last table 'Temp Division' does not show "Terr Regn Mgr Last Names". So is that anything is wrong there as because two column name (D_TERRITORY.Terr Key and F_SALES_TRN_TERR_LIST.Terr Key) are different?

Tags (1)
10 Replies
Highlighted

Re: need Apply map help

You are doing 2 mapping table that means, It will disable and it may assign to next table. Can you do Left join for third table with out using Mapping for second table

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator III
Creator III

Re: Is column name need to be same in ApplyMap() and Mapping table?

Hi,

I have solved the first issue and problem statement has been changed. Please response to the current one.

Highlighted

Re: Is column name need to be same in ApplyMap() and Mapping table?

Will you able to share full script?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
MVP
MVP

Re: Is column name need to be same in ApplyMap() and Mapping table?

Applymap is like a vlookup in Excel. It looks up the value provided - the key name in the ApplyMap statement is not relevant, only the value. The second parameter in the Applymap can be any expression that returns an appropriate value for the lookup.

You have not provided enough of your script to diagnose the "missing" values. Is the field missing, or are some instances of the field values null?

The more information (and small samples that illustrate the problem) that you provide, the more accurate and helpful answers you will receive.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Anonymous
Not applicable

Re: Is column name need to be same in ApplyMap() and Mapping table?

the column names of a mapping table are meaningless...

First column is the Key, second column is the lookup value...

Highlighted
Creator III
Creator III

Re: Is column name need to be same in ApplyMap() and Mapping table?

hi,

Below is the code:

MAP2:

Mapping

load Distinct

  "D_TERRITORY.Terr Key",

  [Terr Regn Mgr Last Name]

resident [D_TERRITORY];

[temp]:

LOAD

[Trn Terr List Key],

ApplyMap('MAP2',"F_SALES_TRN_TERR_LIST.Terr Key") as "Terr Regn Mgr Last Names",

ApplyMap('F_SALES_TRN_Temp',"Trn Key") as "Firm Channel Desc"

resident [F_SALES_TRN_TERR_LIST];

now my second table 'temp', show Terr Key, instead of manager Name in the 'Terr Regn Mgr Last Names' column.

Thanks,

Sandip

Highlighted
Creator III
Creator III

Re: Is column name need to be same in ApplyMap() and Mapping table?

hi,

Below is the code:

MAP2:

Mapping

load Distinct

  "D_TERRITORY.Terr Key",

  [Terr Regn Mgr Last Name]

resident [D_TERRITORY];

[temp]:

LOAD

[Trn Terr List Key],

ApplyMap('MAP2',"F_SALES_TRN_TERR_LIST.Terr Key") as "Terr Regn Mgr Last Names",

ApplyMap('F_SALES_TRN_Temp',"Trn Key") as "Firm Channel Desc"

resident [F_SALES_TRN_TERR_LIST];

now my second table 'temp', show Terr Key, instead of manager Name in the 'Terr Regn Mgr Last Names' column.

Thanks,

Sandip

Highlighted
Creator III
Creator III

Re: Is column name need to be same in ApplyMap() and Mapping table?

ok, then why my second table does not pick up the corresponding values from the Mapping table?

Highlighted
Anonymous
Not applicable

Re: Is column name need to be same in ApplyMap() and Mapping table?

I guess because

"F_SALES_TRN_TERR_LIST.Terr Key"

and

"D_TERRITORY.Terr Key"

don't match ...

Perhaps you could provide some sample data as qvd?