
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Map the country to a table with only city
Hello,
I have a dataset where only the city is available as location and I need to add the country to the datamodel. Do you have any suggestion how this can be done in Qlik Sense?
I have tried using the data manager and there I can create a geocode but it seems I can't generate the country as a separate field based on the city or the geocode. I know I can create a map and see the location country there but the requirement is to see the country information in a table.
Best Regards
Johan
- Tags:
- qlik sense
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on your response I believe you are trying to extract the country name which is built into the Qlik Sense application
City names and countries are loaded in specific tables that can be loaded separately; see below
Cities:
LOAD
Alias as CityAlias,
CountryCode
FROM [lib://__GEO_TABLES/cityAliases.qvd]
(qvd);
Countries:
LOAD
ISO3Code as CountryCode,
ISO2Code,
Country
FROM [lib://__GEO_TABLES/countryISOCodes.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is something preventing you from loading a separate table with city and country information?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well yes I don't have the country in the source, only city, so I can't load a separate table with both the country and the city


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Based on your response I believe you are trying to extract the country name which is built into the Qlik Sense application
City names and countries are loaded in specific tables that can be loaded separately; see below
Cities:
LOAD
Alias as CityAlias,
CountryCode
FROM [lib://__GEO_TABLES/cityAliases.qvd]
(qvd);
Countries:
LOAD
ISO3Code as CountryCode,
ISO2Code,
Country
FROM [lib://__GEO_TABLES/countryISOCodes.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If i copy and paste this script, regardless of the data i have, is this something QLik will just recognise? or do i need to save down any files prior? (same issue as above)
