Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Any one help me how to understand mapping function i.e Map Using?????
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
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
Thanks Marco...
Still i am not able to understand map using funtion..Please give me some link or video on this..
Try this link... http://community.qlik.com/qlikviews/1124
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
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
I think I found the difference. applymap needs 2 be used in each load, where as MAPPING and USING does not. is that correct?
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
Thanks a lot! that's very good practical example