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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Applymap returning the value you are looking up

I am using applymap and for some reason the formula returns the value I am looking up in the mapping table not the value I want to get back from the right hand column in the mapping table.

I know the mapping table contains the value I am looking up.

Any Ideas on the possible cause.

1 Reply
Not applicable
Author

Hi Adrian,

Applymap works as follows :

It will return the value associated with the value of mapname in the mapping table that has previously been created through the mapping load or the mapping select statement.

// Assume the following mapping table:

map1:

mapping load * inline [

x, y

1, one

2, two

3, three ]

ApplyMap ( 'map1', 2 )

returns

' two'

ApplyMap ( 'map1', 4 )

returns

4



In case no value is there in the mapping table then it will return ta default value specified. Like:

ApplyMap ( 'map1', 5, 'xxx' )

returns

'xxx'



If no default value is given, the value of expr will be returned as is.

Please elaborate on your problem more in case it doesnt help.

Thanks & Regards,

Poorva