Learn how to create a map visualization in Power BI.
- [Instructor] Alright, we're here in our Power BI Desktop and we have a new report we're going to start. We are going to create a map visualization. So we're going to go over to our visualizations and we see this little one over here that looks like a globe. And we're going to click on that. And ya know what I'm going to do is I'm going to make this big 'cause this is the only thing we're going to put on this report right now. And, let's start to add in some of our fields. We're going to start with the city and the country and there ya go.
Now, it looks pretty good, right? Well, let me tell ya, there is a problem. And I'm going to scroll on up here. We see that this hotel is in New York City, the United States. That's great. Right where it's supposed to be. But this one here, this hotel is in Vienna, Austria and it seems like our map has put it in Washington D.C. So, there is a bit of a problem there, isn't there? I will say this. Sometimes, Bing maps, which is what this is using, has a little bit of an issue, especially if you have something, a city or a country where, especially cities, if there's multiple cities across the globe with the same name, it doesn't always know where it wants to go, where that map point wants to go.
That's why it's always a good idea, if you can, to include the latitude and the longitude. And we just so happen to have those columns here in our fields. So, when we look here at our visualizations, we see that we have here two places, already specifically for latitude and longitude. So, we're going to select the latitude field and drag it down here and drop it there. And we'll take our longitude and we'll drop it there. And now, let's kind of zoom out here, we see that we no longer have a Vienna, Austria hotel in Washington D.C.
And if we zoom in, we see that it's actually in Vienna where it belongs. (chuckles) So, its a little bit of something that'll help you as you go forward with maps. Now, there is one more thing that I want to do. As you may have noticed, if you start working with maps, you're going to notice this on and off. The map tends to reset to the default size and that may be not what you intend.
So we can fix that by going over to our format, the little paint brush here. And we're going to go down to map controls and you see auto zoom. Auto zoom is on. If we turn it off, our map is not going to resize on us. It's going to just stay the same way that we leave it. Alright now you know how to go ahead and create a map visualization.
- Connecting to data in libraries, lists, services, and more
- Adding custom columns
- Editing queries
- Creating charts and other visualizations
- Combining data from multiple sources
- Managing relationships between data
- Publishing reports to Power BI services
- Embedding reports on SharePoint pages