Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ksk278074
Contributor III

what is apply map?

Hi,

i am new to qlikview so can you please explain about applymap?

Thanks

4 Replies
PabloTrevisan
Partner - Creator II

The ApplyMap script function is used for mapping the output of an expression to a previously loaded mapping table.

Syntax:

ApplyMap('map_name', expression [ , default_mapping ] )

you use it to make mapping applications ...
ie first you create a map and then apply map ..

example:


mapjob:

mapping load

userpass,

    keyyy

FROM [lib://doc/qvd-1.xlsx]

(ooxml, embedded labels, table is Planilha1);

tab_applythemap:

LOAD userpass,

  code,

  APPLYMAP('mapjob',userpass),'error message') AS keypass

In the example, I map the users and passwords that are in a table, and right after I apply the mapping so that - if the user exists he maps the password and plays in the keypass field, if it does not exist it will play the value 'error message' which could be any message

More info: https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/Scripting/MappingFunctions/ApplyMa...

it help's?

vishsaggi
Champion III

Applymap() is a function used to map the field to corresponding field value pair. LIke lookup() function in excel.

Applymap take only two fields. Check here for example:

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/MappingFunctio...

nishanthi_8
Creator

To put it in a simple manner you need a field which exist in another table, instead of join go for the apply map. This works out if you need only for a single field from other table. If you need more than one field go for join. And the syntax is well explained for your question by others

qlikviewwizard
Master II

Hi sivakumar k

Please check Alan Farrell reply.

I cant upload an example, but here is some screen prints

I created a qvd of a mapping table containing 2 columns

I need to add Warehouse Description to my Chambers Table that contains a common field of Warehouse

1.png

Then in my chamber table I use the ApplyMap function to lookup against my mapping table above, so I can add the Warehouse Description to Chamber Table

2.png

Basically it has allowed me add the Warehouse Description to my Chambers table, like you would use the VLOOKUP Function in Excel

I hope that helps