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.
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.
Solved! Go to Solution.
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:
Hope this helps.
Maria
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
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.
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:
Hope this helps.
Maria
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |