Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Map..Using (mapping) fucntion Info please..

Any one help me how to understand mapping function i.e Map Using?????

1 Solution

Accepted Solutions

Re: Map..Using (mapping) fucntion Info please..

Hi,

If you mean the use of MAPPING and USING in the script, please take a look at the following example. First, you need a mapping table, then you use the MAP sentence, and from then, all values in CountryCode will be changed for the matching in the mapping table. In the example, ES and US will be changed to "Spain" and "United States", while UK will stay (there's no match in the mapping table for that value).

CountryNamesMap:

MAPPING LOAD * INLINE [

ShortName, LongName

ES, Spain

US, United States

];

MAP CountryCode USING CountryNamesMap;

Data:

LOAD * INLINE [

CountryCode

ES

UK

US

];

Hope that helps.

Miguel

22 Replies
chooco_co
Valued Contributor

Map..Using (mapping) fucntion Info please..

hi stalwart,

you can use googlemap to combine with your qvw, or using streetdirectory.

if you want detail please search in this community "google map"

regards,

marco

Not applicable

Map..Using (mapping) fucntion Info please..

Thanks Marco...

Not applicable

Map..Using (mapping) fucntion Info please..

Still i am not able to understand map using funtion..Please give me some link or video on this..

Siva_Sankar
Honored Contributor

Map..Using (mapping) fucntion Info please..

Re: Map..Using (mapping) fucntion Info please..

Hi,

If you mean the use of MAPPING and USING in the script, please take a look at the following example. First, you need a mapping table, then you use the MAP sentence, and from then, all values in CountryCode will be changed for the matching in the mapping table. In the example, ES and US will be changed to "Spain" and "United States", while UK will stay (there's no match in the mapping table for that value).

CountryNamesMap:

MAPPING LOAD * INLINE [

ShortName, LongName

ES, Spain

US, United States

];

MAP CountryCode USING CountryNamesMap;

Data:

LOAD * INLINE [

CountryCode

ES

UK

US

];

Hope that helps.

Miguel

aboumejjane
Contributor

Map..Using (mapping) fucntion Info please..

Hi Miquel,

I personally would use applymap for your example. I've never used MAPPING and USING.

What's the fundemental difference between applymap and MAPPING and USING? They really appear the same 2 me.

Cheers!

iSam

aboumejjane
Contributor

Map..Using (mapping) fucntion Info please..

I think I found the difference. applymap needs 2 be used in each load, where as MAPPING and USING does not. is that correct?

Re: Map..Using (mapping) fucntion Info please..

Hi,

Yes, that's right. Think of a data model where you have a lot of CountryID fields which values you want to rename in the whole data model. You would either use as many ApplyMap() functions as fields you want to change, or use MAP Field USING after the MAPPING LOAD.

Hope that makes sense.

Miguel

aboumejjane
Contributor

Map..Using (mapping) fucntion Info please..

Thanks a lot! that's very good practical example