Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
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?

10 Replies
Anil_Babu_Samineni

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)
ananyaghosh
Creator III
Creator III
Author

Hi,

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

Anil_Babu_Samineni

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)
jonathandienst
Partner - Champion III
Partner - Champion III

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
Anonymous
Not applicable

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

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

ananyaghosh
Creator III
Creator III
Author

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

ananyaghosh
Creator III
Creator III
Author

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

ananyaghosh
Creator III
Creator III
Author

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

Anonymous
Not applicable

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?