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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Problem with Maps visualization

Hi all, 

 

I am learning how to use Power BI using World Economic Forum Data. I am trying to show the top 10 countries by GDP on a map.  However, Map view is not working properly.  When I change views to Map, it only shows one datapoint (China) and displays it in Mexico. I have ensured that the data is being read as country data. Please see the picture attached, the top pictue shows a bar chart and the bottom picture shows what should be the same data in a map. 

 

Can anyone tell me why this is happening?

 

Thank you. 

 Power BI Issue With Maps.PNG

1 ACCEPTED SOLUTION
MariaP
Solution Supplier
Solution Supplier

Hi @Anonymous ,

 

I have created a quick result using WIKI data. ( China and European Union Country Name needs to be corrected before they can be shown on the map, hence only 8 countires are currently displaying)

 

To show the top 10 countries by GDP I have used the approach below.

Create 3 measures as shown below and then place 'Country' into Location and 'TOTAL GDP TOP 10 RANK' in Size within the fields for  the Map Visual.

Measure 1:
SUM GDP = SUM(GDP[GDP])

Measure 2:
GDP RANK = RANKX(ALL(GDP), [SUM GDP],,DESC,SKIP)

Measure 3:
TOTAL GDP TOP 10 RANK = CALCULATE ([SUM GDP], FILTER( GDP,[GDP RANK]<= 10 ) )

 

Here is the sample for you if needed to understand further: PBI SAMPLE 

You may then use your data to replicate.

 

Here are the results on the map and in a table:

 

Top 10 by GDP- Source https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)Top 10 by GDP- Source https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)

 

Hope this helps.

 

Maria

View solution in original post

3 REPLIES 3
nbm
New Member

hi Maria

 

Thank you for the answer to this post, how would I further drill down. If for instance, I wanted to include the GDP per province and I did have info for the province column. 

 

Thanks

Lacey
Regular Visitor

Hi, 

A bit late but I was having the same issue. 

If you click on the visual, then click Column Tool tab, then change the Data Category to CountRy instead of County.

That was my issue at least. 

MariaP
Solution Supplier
Solution Supplier

Hi @Anonymous ,

 

I have created a quick result using WIKI data. ( China and European Union Country Name needs to be corrected before they can be shown on the map, hence only 8 countires are currently displaying)

 

To show the top 10 countries by GDP I have used the approach below.

Create 3 measures as shown below and then place 'Country' into Location and 'TOTAL GDP TOP 10 RANK' in Size within the fields for  the Map Visual.

Measure 1:
SUM GDP = SUM(GDP[GDP])

Measure 2:
GDP RANK = RANKX(ALL(GDP), [SUM GDP],,DESC,SKIP)

Measure 3:
TOTAL GDP TOP 10 RANK = CALCULATE ([SUM GDP], FILTER( GDP,[GDP RANK]<= 10 ) )

 

Here is the sample for you if needed to understand further: PBI SAMPLE 

You may then use your data to replicate.

 

Here are the results on the map and in a table:

 

Top 10 by GDP- Source https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)Top 10 by GDP- Source https://en.wikipedia.org/wiki/List_of_countries_by_GDP_(nominal)

 

Hope this helps.

 

Maria

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.