Reply
Frequent Visitor
Posts: 9
Registered: ‎01-09-2017
Accepted Solution

Geography Layers

Hello, I am new to Microsoft Power Bi and i am trying to get a filled map to represent both the data for the United States nation and a singular state. My data contains both United States data and (i.e.) New Jersey data. I have tried putting in (new jersey, new jersey), (united stares of america, new jersey, united states of america). When i select geography types in the data format power bi only seems to accept one of them (county/region, place, Country). For example the united states will be filled in, but once a filter is selected then for new jersey it won't highlight it. Is there a way to get both on the same map and highlight each one while selected?


Accepted Solutions
Moderator
Posts: 2,836
Registered: ‎03-10-2016

Re: Geography Layers

[ Edited ]

Hi @microsoftrookie,

You get an expected behavior in filled map. As your post, we are only able to select the geography column as either a state or a country. When you label geography column as country, how does Power BI recognize New Jersey as a country since it is a state? And vice versa.

In your scenario, if you persist to use filled map, you would need to separate data of  New Jersey and United States into different tables, then create two filled maps.

However, if you don’t want to separate data of  New Jersey and United States into different tables, then you can add Latitude and Longitude columns in your current table, and create a map visual instead of filled map using Latitude, Longitude columns and numerical data columns. This way, when you create a slicer using geography column, you can highlight proper section in map visual when selecting value in the slicer.

Thanks,
Lydia Zhang

View solution in original post


All Replies
Moderator
Posts: 2,836
Registered: ‎03-10-2016

Re: Geography Layers

[ Edited ]

Hi @microsoftrookie,

Could you please share sample data of your scenario and post expected result here? We also need to know that what fields you use to create the filled map visual.

Besides, please take a look at the following blog about creating filled map in Power BI Desktop.

https://powerbi.microsoft.com/en-us/documentation/powerbi-service-tutorial-filled-maps-choropleths/


Thanks,
Lydia Zhang

Frequent Visitor
Posts: 9
Registered: ‎01-09-2017

Re: Geography Layers

Sure thing. data snips.PNGgeography locations.PNGUnited states filled map.PNGNew Jersey Filled in on map.PNGNew Jersey not filled in map.PNG

I do not know if I did this correctly, however I need to be able to display both United States and New Jersey as their own seperate entities. The first picture is a sample of some numerical data that we used for the nation, and the nation data is in the same column as a state's data.  The next picture is how the geographies are listed in the same column in the queries. For example, pie charts and graphs are able to both of these geographies numerical data well. I need to be able to represent the nation as highlighted in the third picture, but when a slicer is selected like in the 5th picture, I need it to highlight just the state as it is in the 4th picture. However, currently I can only select my geography column as either a state or a country, and will only pick up on highlighting one and returning the final map, as shown with nothing filled in. So, if the column is labeled at country, and I select a New Jersey slicer will not highlight new jersey, but if I select United States it has been returning the filled Country map like in picture 3, and vice versa.

Frequent Visitor
Posts: 9
Registered: ‎01-09-2017

Re: Geography Layers

Sure thing. data snips.PNGgeography locations.PNGUnited states filled map.PNGNew Jersey Filled in on map.PNGNew Jersey not filled in map.PNG

I do not know if I did this correctly, however I need to be able to display both United States and New Jersey as their own seperate entities. The first picture is a sample of some numerical data that we used for the nation, and the nation data is in the same column as a state's data.  The next picture is how the geographies are listed in the same column in the queries. For example, pie charts and graphs are able to both of these geographies numerical data well. I need to be able to represent the nation as highlighted in the third picture, but when a slicer is selected like in the 5th picture, I need it to highlight just the state as it is in the 4th picture. However, currently I can only select my geography column as either a state or a country, and will only pick up on highlighting one and returning the final map, as shown with nothing filled in. So, if the column is labeled at country, and I select a New Jersey slicer will not highlight new jersey, but if I select United States it has been returning the filled Country map like in picture 3, and vice versa.

Moderator
Posts: 2,836
Registered: ‎03-10-2016

Re: Geography Layers

[ Edited ]

Hi @microsoftrookie,

You get an expected behavior in filled map. As your post, we are only able to select the geography column as either a state or a country. When you label geography column as country, how does Power BI recognize New Jersey as a country since it is a state? And vice versa.

In your scenario, if you persist to use filled map, you would need to separate data of  New Jersey and United States into different tables, then create two filled maps.

However, if you don’t want to separate data of  New Jersey and United States into different tables, then you can add Latitude and Longitude columns in your current table, and create a map visual instead of filled map using Latitude, Longitude columns and numerical data columns. This way, when you create a slicer using geography column, you can highlight proper section in map visual when selecting value in the slicer.

Thanks,
Lydia Zhang

Frequent Visitor
Posts: 9
Registered: ‎01-09-2017

Re: Geography Layers

Thank you very much.  Simply when i select new jersey, it does not recogognize it at all as a location on the map, and if they are labeled as a state geographies the united states is not recognized. However, Thank you for longitude and latitude suggestion.

Highlighted
Frequent Visitor
Posts: 10
Registered: ‎01-16-2017

Re: Geography Layers

[ Edited ]

Hi,

 

I think the crux of this question goes to the idea of layering in order to offer an alternative to having to view related data seperately on the same tile or in different tiles. In the case of geographic data for example it would be really useful to be able to present a shape map and layer over that specific locations represented by a post code (zip code). As far as I know this cannot yet be done but it would be a really useful feature. There have been a number of other posts in the forums asking about layering also