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: 
khasimvali85
Creator II
Creator II

ApplyMap Function Use and Where Should we Use This Function?

Hi,

About ApplyMap() Can Anybody Explain brief with Example?

Thanks

Khasim

1 Solution

Accepted Solutions
vijetas42
Specialist
Specialist

Hi,

Check this example,Hope you will understand

TEMP:

Mapping Load * Inline

[

  id2, pg1

  1, abc

  2, mno

  3, tuv

  4, xyz

];

T1: 

Load * Inline

[                 

  id1, id2, value

  A, 1, 100

  B, 2, 120

  C, 3, 140

]Where Match(id1,'A','B');

Left Join

Load * Inline

[

  id1, pg1

  A, pqr

  B,

  D, xyz

  E, 123

];

NoConcatenate

FINAL:

Load id1, id2, value, IF(pg1='',ApplyMap('TEMP',id2),pg1) as pg1  Resident T1;

Drop Table T1;

Regards,

Vijeta

View solution in original post

8 Replies
jebamalai
Specialist
Specialist

Check this link

Apply Map Concept

vijetas42
Specialist
Specialist

Hi,

ApplyMap is a Mapping or lookup function

Ex. one of my scenario where I have applied ApplyMap is,

For missing Employee name we have to use lookup function (ApplyMap) to get data from excel .At the time of showing Employee code and Employee name, from sap source table we have, Employee code Employee name that is  but for some of the Employee code, Employee name is missing and there is excel file in which they are having Employee code and name so, we have used ApplyMap and checked that if any Employee name is missing then apply lookup on excel for respective Employee code and get that Employee name.

Hope this will help you to understand ApplyMap concept and where it should be applied!!!

Regards,

Vijeta 

ngulliver
Partner - Specialist III
Partner - Specialist III

Hi,

As well as Henric's excellent blog there is also one by Steve Dark that is worth looking at:

http://www.quickintelligence.co.uk/applymap-is-it-so-wrong/

Regards,

Neil

Not applicable

Hi,

It works similar to Vlookup in Excel. Only Difference is we need to create Mapping table to fetch the relevant data. Mapping table always contains 2 columns, first column is the reference and second column is the data which you want to extract, only drawback is from one mapping table you can extract only one column, cannot fetch multiple columns from single mapping table....

Regards,

Savitha

khasimvali85
Creator II
Creator II
Author

Hi Savitha,

Thanks for Information

i under stood the concept but how to apply in Script? give me two or more examples.

Thanks

Khasim.

khasimvali85
Creator II
Creator II
Author

Hi Sharma,

Thanks for Information

i under stood the concept but how to apply in Script? give me two or more examples.

Thanks

Khasim.

vijetas42
Specialist
Specialist

Hi,

Check this example,Hope you will understand

TEMP:

Mapping Load * Inline

[

  id2, pg1

  1, abc

  2, mno

  3, tuv

  4, xyz

];

T1: 

Load * Inline

[                 

  id1, id2, value

  A, 1, 100

  B, 2, 120

  C, 3, 140

]Where Match(id1,'A','B');

Left Join

Load * Inline

[

  id1, pg1

  A, pqr

  B,

  D, xyz

  E, 123

];

NoConcatenate

FINAL:

Load id1, id2, value, IF(pg1='',ApplyMap('TEMP',id2),pg1) as pg1  Resident T1;

Drop Table T1;

Regards,

Vijeta