Forum Discussion
How to map latitude longitude
- Anonymous11 years ago
sjkp,
This one is a little counter intuitive. The only map tool that can take straight lat/long is Power Map in Excel, but there currently isn't any integration with the rest of the BI stack yet for that.
The way you do this in Power View - maps, or the PBI Desktop is put you lat and long in the appropriate Fields, then whatever it is you are examining in that location (count of wrecks, count of "x") that goes in the location and the value fields. Then your bubbles will show up in the middle of the ocean at the coordinates you specified in the lat/long.
If there aren't direct counts, I would assume you can just create a column to contain the value of 1 to make this work.
Here is a screenshot of the sample data I pulled in and the layout in PBI Desktop
In addition to the hints I found here concerning setting data category to Longitude / Latitude and data format to decimal I got the expected picture when I set "Default Summarization" of Longitude and Latitude to "Maximum" (Take "Minimum" if you want, it does not matter as long as the summarization delivers the Longitude/Latitude values themselves - An "Only" function like in QlikView would be the correct choice for this purpose here)
In the location field of the map tool, I entered "Country" which does the trick. It does it before without Longitude/Latitude but I needed 5 seperate Regions in China, which I did noct achieve before. I have 5 different entries for them in "Countries" as well, so I think it's the combination of unique combinations of Country/Longitude/Latitude that makes it work.
I've encountered the same issue.
There is however a workaround. Add a column that concenates the latitude and longtitude values, together with a comma, eg: Location = [Latitude]&", "& [Longitude]. Map that column to the location field and don't mind using the latitude and longtitude field. That should do the trick.
Regards,
Richard van der Pool
- Jamie110 years agoRegular Visitor
Thank you Richard - this worked perfectly. Why we even need such a workaround is something of a mystery - would it not be one of the first things you'd test with a mapping visual?
- tmandin10 years agoNew Member
When I use a concatenated lat/long in Power BI Desktop I get the following pop-up:
Subject: More location data is required to create a filled map
Detail: To create a filled map, the Location data should include Bing Map-supported geographic data, such as country/region, state/province, or postal code.
- tmandin10 years agoNew Member
I was able to get it working by:
1. Using a concatenated lat/long in the "Location" field (eg. "<latitude>,<longitude>", no quotes though)
2. Putting Latitude into the "Latitude" field
3. Putting Longitude into the "Values" field, NOT the Longitude field
4. Leaving the "Longitude" field empty
I don't know why it worked, but it did.
- KevinH108 years agoFrequent Visitor
It worked out!!! But the problem I get is that the name shown of the location is the coordinates of longitude and latitude. Any suggestions on how to solve this? Thanks.
Kevin Hernández
- KevinH108 years agoFrequent Visitor
It worked out!!! The only problem is that in tooltips the name of the destination is shown as the coordinates of latitude and longitude. Any suggestions in solving this problem??? Thanks.
Kevin Hernández