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

Qlik Sense Map - Wrong Country for City

Hi,

I'm loading Cities for US only but when I display them in the Map, they show for other countries.

A good example is Valencia showing for Spain and not US:

Kevin-M_0-1622742914022.png

I have defined the values as follows in the Data Manager but it looks like Qlik is ignoring the Country and basing location on City alone.

Sold To Country:

Kevin-M_1-1622743030122.png

Sold  To City:

Kevin-M_2-1622743079474.png

What am I missing?  I appreciate any help with this item.

Thanks

 

 

 

1 Solution

Accepted Solutions
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello @Kevin-M 

I tried to replicate your issue. See QVF.

You should solve this in the script. You can do this in the tableviewer or manually. Look for example code in the QVF. 

eddie_wagt_0-1623153921496.png

Regards Eddie

View solution in original post

8 Replies
eddie_wagt
Partner - Creator III
Partner - Creator III

Hello,

What is the value of Sold_To_Country, this must be something like this 'NL'. This is for The Netherlands. For USA it is probably 'US'. So maybe you could something like this =chr(39)&Sold_To_Country&chr(39)?

Regards

Eddie

Kevin-M
Contributor II
Contributor II
Author

Hi Eddie,

 

We are using 'US' as Sold_To_Country, please see table at the bottom of the first screenshot where second column is 'US'.  We are then defining this value as 'Country Code IS02', it just looks like the City is ignoring this and determining City on it's own and not using the 'Associated Country' as per the third screenshot.

 

Thanks,

Kevin

 

nrichards_au
Contributor II
Contributor II

Hi Kevin,

I get the exact same thing with my Australian data.

I'm assuming you're using the default maps with QlikSense. I've only ever done it with Postcode/Zipcode option

But these are the steps I follow

  1. Add a map chart
  2. Add a layer
  3. Choose location option
  4. Set custom scope for locations
  5. Manually set your country (for you  'US')
  6. Set the location field
  7. Set the location type

The map chart should do the rest.

 

 

 

 

 

eddie_wagt
Partner - Creator III
Partner - Creator III

Hello Kevin,

The countrycode must between single quotes. Otherwise look at @nrichards_au 's post.

Regards Eddie

Kevin-M
Contributor II
Contributor II
Author

@eddie_wagt  and @nrichards_au , Thanks for both of your replies.

Unfortunately I'm not making much progress, I'm sure this is something I'm doing wrong, I'm just not sure what it is!  Using Georgia as an example, for cities that might belong to other countries, Rome for example which can be Georgia, US or Italy, it's showing for Italy. 

Kevin-M_0-1623090669117.png

If I add the country (with single quotes) to the location, all map points are wiped out:

Kevin-M_1-1623090756760.png

Thanks,

Kevin

eddie_wagt
Partner - Creator III
Partner - Creator III

Hello @Kevin-M 

I tried to replicate your issue. See QVF.

You should solve this in the script. You can do this in the tableviewer or manually. Look for example code in the QVF. 

eddie_wagt_0-1623153921496.png

Regards Eddie

Kevin-M
Contributor II
Contributor II
Author

Thanks @eddie_wagt ,

Looking at you QVF, all I was missing was adding [Ship_To_Customers.Ship_To_Customer_City_GeoInfo] to location, once added it looks to be resolved:

Kevin-M_0-1623161080007.png

Thanks for the help!

 

eddie_wagt
Partner - Creator III
Partner - Creator III

Great work @Kevin-M . You are welcome. Glad it solved your problem.