- Article
- 6 minutes to read
APPLIES TO: PowerBDesktop
PowerBI service
Power BI integrates with Bing Maps to provide default map coordinates (a process called geocoding) so you can create maps. Together they use algorithms to pinpoint the correct location, but sometimes it's a guess. If Power BI tries to create your map visualization itself but is unable to do so, trust Bing Maps to help. read more inBing Maps-Dokumentation.
Use the following tips to increase the likelihood of geocoding correctly. You should use the first tips if you have access to your own dataset. The second set of tips are things you can do in Power BI when you don't have access to the dataset.
What is sent to Bing Maps?
The Power BI service and Power BI Desktop send the geographic data needed to create the map visualization to Bing. This may contain the data in theOrt,Broad, miLongField of view dice fine. Exactly what is sent varies by card type. For more information, seeBing Maps Privacy.
Maps (bubble, scatter, and dotplot maps) don't send data to Bing when latitude and longitude are provided. Otherwise, all data in theOrtThe deposit is sent to Bing.
Completed maps require a field in theOrtBucket; although latitude and longitude are given. All data that is in theOrt,Broad, ÖLongThe deposit is sent to Bing.
In the example below, the field ispostal codeused for geocoding, so the PostalCode column values are sent to Bing. Data fromsizeThe deposit is not sent to Bing.
See Also-for, foreach, do and while iteration statementsMicrosoft Power Platform licensing overview - Power PlatformWhat are Communication Credits? - Microsoft TeamsApply conditional table formatting in Power BI - Power BIIn this second example below is the fieldAreaused for geocoding, so the values in the Territory column are sent to Bing. Data fromLegendbuckets (and thecolor saturationCube when using Shape Map in Power BI Desktop) is not sent to Bing.
In the dataset: Tips for improving the underlying dataset
If you have access to the dataset that will be used to create the map display, there are a few things you can do to increase the likelihood of successful geocoding.
1. Categorize non-Power BI Desktop geographic fields
In Power BI Desktop, you can ensure fields are geocoded correctly by setting thisData categoricallyin the data fields. In the data view, select the column you want. On the ribbon, select thecolumn toolstab and then set theData categoricallyProDirection,Ciudad,continent,Land,district,postal code,To express, Öprovince.
These categories of data help Bing properly encode the data. For more information, seeData categorization in Power BI Desktop. If you are connecting live to SQL Server Analysis Services, you must define data categorization outside of Power BI usingSQL Server-Datentools (SSDT).
2. Use more than one location column
Sometimes even defining the data categories to be mapped is not enough for Bing to correctly guess your intent. Some designations are ambiguous as the location exists in multiple countries or regions. For example, there is oneSouthamptonin England, Pennsylvania und New York.
Power BI EE. UU. von BingUnstructured URL template serviceto get latitude and longitude coordinates based on a set of address values for each country. If you don't have enough location data in your data, add these columns and order them accordingly.
For example, if you only have a City column, Bing might have trouble geocoding. Add additional geographic columns to make location unique. Sometimes just one more location column is added to the record, in this case State/Province. And don't forget to categorize it properly, see point 1 above.
Make sure each field has only one location category. For example, the location field should be CitySouthampton, noSouthampton, NewYork. And the address location fields should be1 Microsoft Roadand not1 Microsoft Way, Redmond, Washington.
3. Use a specific latitude and longitude
Add latitude and longitude values to your dataset. This eliminates ambiguity and returns results faster. The Latitude and Longitude fields must be activateddecimal numberFormat that you can define in the data model.
monitoring
Earlier versions of Power BI Desktop or the Power BI service may be used in this video.
4. Use the Location category for columns with full location information
While we recommend using geographic hierarchies in your maps, if you need to use a single location column with complete geographic information, you can set up data categorizationOrt. For example, if your column data is full addresses, e.g. 1 Microsoft Way, Redmond Washington 98052, this generalized category of data works better with Bing.
In Power BI: Tips for getting better results when using map visualizations
1. Use the latitude and longitude fields (if any)
If the dataset you're using in Power BI has longitude and latitude fields, use them! Power BI has special cubes to make the data on the map unique. Just drag the field with your latitude data onto theViews > LatitudeArea. Do the same with your length specifications. You must also fill out the formOrtfield when creating your visualizations. Otherwise, the data is aggregated by default, so, for example, latitude and longitude would be matched at the state level rather than the city level.
Use geographic hierarchies so you can drill down to different "levels" of locations
If your data set already contains different layers of location data, you and your colleagues can use Power BI to create themgeographic hierarchies. To do this, drag more than one field onto theOrtBucket. Used together in this way, the fields become a geographic hierarchy. In the example below, we add geographic fields for: Country/Region, State, and City. In Power BI, you and your colleagues can drill up and down using this geographic hierarchy.
When browsing with geographic hierarchies, it's important to understand how each browse button works and what is being sent to Bing Maps.
- The rightmost browse button labeled Browse Mode
, you can select a location on the map and drill down to that specific location, level by level. For example, if you turn on the drill down option and select North America, you go down the hierarchy to the next level: the North American states. For geocoding, Power BI sends country and state data from Bing Maps for North America only.
- On the left are two more drilling options. The first way
, drills down to the next level of the hierarchy for all locations at once. For example, if you're searching for countries or regions and use this option to go to the next level, States, Power BI displays state data for all countries. For geocoding, Power BI sends state data from Bing Maps (without country data) for all locations. This option is useful when each level in your hierarchy is not connected to the level above it.
- The second possibility
, is similar to the drill down option except you don't have to click on the map. It expands to the next level in the hierarchy by remembering the context of the current level. For example, if you search for countries and select this icon, you will be moved down the hierarchy to the next level: States. For geocoding, Power BI sends data for each state and corresponding country to help Bing Maps geocode more accurately. On most maps, use this option or the drill down option on the far right so you can send as much information as possible to Bing for accurate location information.
Next Steps
Drill down in a Power BI visualization
Power BI visualizations
More questions?Experience the Power BI community