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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

how to use ApplyMap in my joining script?

Hi,

I want to use ApplyMap in the below joining script:

[Temp Division]:
load
"Firm ID",
"Trn Key"
resident [F_SALES_TRN];
left join

LOAD
[Trn Key]
,"F_SALES_TRN_TERR_LIST.Terr Key" as [Terr Key]
resident [F_SALES_TRN_TERR_LIST];
left join
load
  Distinct
  "D_TERRITORY.Terr Key" as [Terr Key],
  [Terr Regn Mgr Last Name],
  [Terr Regn Mgr First Name],
  [Manager Wholesaler]   
resident [D_TERRITORY];
left join
LOAD
  Distinct
  "Firm ID",
  "Firm Channel Desc"
resident [D_FIRM];

Thanks,

Sandip

11 Replies
ananyaghosh
Creator III
Creator III
Author

hi,

I have tried it in many ways , but I failed, as because '"F_SALES_TRN_TERR_LIST.Terr Key" means the column name used in ApplyMap function ,  is different than Mapping column name. So it will not work.

Thanks,

Sandip

jmvilaplanap
Specialist
Specialist

Sorry, my last comment is wrong, the double map is like the first one comment

  • ApplyMap('MAP1', ApplyMap('MAP5',[Trn Key])) AS "Firm Channel Desc",

And the MAP5 is in the wrong order (now is good)

MAP5:

Mapping

load

  "Trn Key",

  "Firm ID",

resident [F_SALES_TRN];

Try with this code:

MAP1:
Mapping
LOAD
Distinct
"Firm ID",
"Firm Channel Desc"
resident [D_FIRM];

MAP2:
Mapping
load Distinct
"D_TERRITORY.Terr Key",
[Terr Regn Mgr Last Name]
resident [D_TERRITORY];

MAP3:
Mapping
load Distinct
"D_TERRITORY.Terr Key",
[Terr Regn Mgr First Name]
resident [D_TERRITORY];

MAP4:
Mapping
load Distinct
"D_TERRITORY.Terr Key",
[Manager Wholesaler] 
resident [D_TERRITORY];

MAP5:
Mapping
load
"Trn Key",
"Firm ID",
resident [F_SALES_TRN];

[Temp Division]:
LOAD
ApplyMap('MAP1', ApplyMap('MAP5',[Trn Key])) AS "Firm Channel Desc",
ApplyMap('MAP2', "F_SALES_TRN_TERR_LIST.Terr Key") AS [Terr Regn Mgr Last Name] ,
ApplyMap('MAP3', "F_SALES_TRN_TERR_LIST.Terr Key") AS [Terr Regn Mgr First Name] ,
ApplyMap('MAP4', "F_SALES_TRN_TERR_LIST.Terr Key") AS [Manager Wholesaler]
resident [F_SALES_TRN_TERR_LIST];