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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
sjkp
Advocate II
Advocate II

How to map latitude longitude

I'm trying to plot latitude longitude on a map in power bi Desktop on a standard map.
In location field I'm unable to add both latitude and longitude. There are also two fields for latitude and longitude but they don't seem to work? Am I doing something wrong, or is it not possible to simply give the map the location to plot.

I can get it working if I use an adresse in the location field, but I'm trying to map positions at sea, so not really useful.

1 ACCEPTED SOLUTION

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

Capture.JPG


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

30 REPLIES 30

Totally agree that ANY mapping tool that does not NATIVELY support LAT and LONG is next to useless. This is a bug in my eyes. Maybe I would agree to stating it as a 'feature deficiency' due to the fact that Microsoft will likely claim it "works as designed". What's more, when using Power BI Desktop, and on the Modelling tab I specify that lat and long are categorized as such, AND I specify "Do not summarize" for both, when I drag them into their respecitve drop zones for the map, it sets them as "Average of latitude" and "Average of longitude" respectively.

 

Hey, I thought this was supposed to be easy and intuitive.

Not so with maps. The latest November 2015 update that includes the Globe Map (like what you get in Power Map for Excel) is no different. I guess mapping for the average user will have to wait until they fix this.




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





I have found that the longitude and latitude are accepted by POWERBI once the Data type = Decimal and the Data Category = Longitude or Latitude BUT POWER BI doesn't actually do anything with it.  I have had success dropping the name of the suburb into the Location, then sales into the Values section.    PowerMap is way better, but I suppose that is why it's called PowerMap 🙂

 

 

Hi,

 

I have the same problem with a map in Power BI Desktop. I have some registers with Longitude and Latitude but when I want to see them in the map they don't appear correctly. Which is the solution? Thanks in advance.

 

All registers of my dataset are from the UK bit. I have tried putting "localidad" from the DimGeograpy in the "Ubicacion" field but, as some "localidad" fields are named as in Australia, for example, they appear in Australia. and not in the UK...

 

Power BI.jpg

Thanks Eno, I was looking for a solution that works in power bi deskop and preferably powerbi.com (online) or whatever the name for it is. I am aware that it works in power map, but that is not really the tool I want to suggest customers to use going forward. 

 

I hope it's a bug or just a missing feature that it currently  is so unintuitive to use. But I will try out your suggestion. 

Okay that is pretty **bleep**ed up. If I use a value of 1 for the location, then it will not work, the location value has to be unique. Because if it's not then it will sum all the lat/long together with the same location, which will obviously not give anything meaning full. 

You can choose "Average", and it will cluster the latitude and longitude to a central location dependent of the grouping of your dataset.  So, if you group by city, it would average the Lat and Long to the center of all of the adresses within that city, and then would show the bubble size as the number of adresses clustered into that location.

@sjkp,

Looked into this a little more, as I wanted to get this to work.

If you look at the below snapshot, I've created decimals as numbers to (in theory) reduce the bubble size so they all look the same. Then, when I set up the map, I selected the field "Count" in the value section and chose "Count(distinct)"

I'd throw in a "Boom goes the dynamite" here out of excitement if I thought this solved it completely, but I think it's just a hack that works. As a word of caution, I started messing around with calculated columns to try to randomly generate the decimals in PBI Desktop, and when I did so, the bubbles increased in size... Though, I definetely think it's an option in your original data set prior to pulling it in. In any case, give a whirl with your dataset and let me know if it works for you. (I also made sure that it published to the site correctly, and it did.)

Capture.JPG

(edit to ping sjkp)


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

@Seth_C_Bauer i agree with you on the hack part, but it will do until it is hopefully fixed. Thanks help helping out, much appreciated 🙂

 Hi, in my case, no show results

 

Data.jpg

Greg_Deckler
Super User
Super User

Can you provide an example of the format you are using for latitude and longitude? Should be like:

Text,Latitude,Longitude
Thing1,-37.8136,144.9631

 

That is Melbourne Australia

 

In your data model, click on the column for Latitude and set the "Data category" to "Latitude". Do the same for Longitude. This is on the Modeling tab.

 

The way this is *supposed* to work is that in the map visualization you put your text identifier as the Location, you put your Longitude and Latitude into their appropriate fields and voila, you have your map. This works perfectly in Excel Power View. Note in Excel, the data cateogorization and on the "Advanced" tab.

 

Not so much in Power BI Desktop, it wants to put "Count of Longitude" and "Count of Latitude" into the Longitude and Latitude fields even though I have them categorized correctly. I'd say it's a bug personally. Interestingly, in the "Location" field suggestions it says that it can either be named location or latitude and longitude coordinates, but it doesn't allow you to drag two fields in that and I haven't found a combination of longitude and latitude that I can drag into that field to make it do anything useful.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.