Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
johanb
Partner - Contributor
Partner - Contributor

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

Labels (3)
1 Solution

Accepted Solutions
lorenzoconforti
Specialist II
Specialist II

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);

 

View solution in original post

4 Replies
lorenzoconforti
Specialist II
Specialist II

Is something preventing you from loading a separate table with city and country information?

johanb
Partner - Contributor
Partner - Contributor
Author

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

lorenzoconforti
Specialist II
Specialist II

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);

 

nickmarlborough
Contributor III
Contributor III

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)