Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Map feature question

Hello,

After some time of trouble i have managed to load a KML file because i have seen that my map when i used the auto feature from Qliksense was missing several countries.

Now, i have another issue. My country names are in french and my KML file has the ISO2 code.

In order to link this i have come to the conclusion that i need to use almost 200 if statements to modify the french country names to the ISO2 code during  the script load.

I mean statements like this: if([COUNTRYREGIONID]= 'France', 'FR', [COUNTRYREGIONID] ) as [COUNTRYREGIONID],

This means that it is a crazy work to do and also that my script load will be too long.

Is there any other fastest way to perform this?

Best regards,

Lawrence

1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Lawrence,

you can solve this problem in a lot more elegant way, using a MAPPING table. Create an Excel table with 200 countries and 200 pairs of values - the French country name and the ISO2 code.

Then, load the Excel Table using a MAPPING load:

Country_Map:

MAPPING LOAD

     Country,

     ISO2

FROM ...

;

Then, apply the map in the table where you have your French country names:

LOAD

  ...

  Country,

  ApplyMap('Country_Map', Country, 'N/A') as ISO2,

...

You can read more about MAPPING in the Help Section.

Cheers,

Oleg Troyansky

Upgrade your Qlik skills with my book QlikView Your Business: An Expert Guide to Business Discovery with QlikView and Qlik Sense

View solution in original post

2 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Lawrence,

you can solve this problem in a lot more elegant way, using a MAPPING table. Create an Excel table with 200 countries and 200 pairs of values - the French country name and the ISO2 code.

Then, load the Excel Table using a MAPPING load:

Country_Map:

MAPPING LOAD

     Country,

     ISO2

FROM ...

;

Then, apply the map in the table where you have your French country names:

LOAD

  ...

  Country,

  ApplyMap('Country_Map', Country, 'N/A') as ISO2,

...

You can read more about MAPPING in the Help Section.

Cheers,

Oleg Troyansky

Upgrade your Qlik skills with my book QlikView Your Business: An Expert Guide to Business Discovery with QlikView and Qlik Sense

rivenbryan
Contributor
Contributor

Hi, do you mind to elaborate? 

 

FROM .. what should i put insde? Sorry i am very new to Qliksense Programming Syntax.