Ravindra BagaleCourses & study guides मराठी Track your progress

15. Maps: Showing Maharashtra on a Map

15.3 Data Categories and Geocoding

Start with a problem

Shahrukh's map puts a bubble for Aurangabad in the wrong place and ignores Sambhaji Nagar written in two spellings.

Explain simply

Data category tells Power BI what a column means (City, State, Country, Postal code, Latitude, Longitude). Geocoding turns those names into map positions. Clear categories and full names give correct positions.

Show the data

City (raw) Problem Fix
Aurangabad Old name; ambiguous worldwide Standardise to Sambhaji Nagar (Module 7.9)
Chh. Sambhajinagar Spelling variant Map to one spelling
Pune Could match another Pune Add State and Country

About this data: This table uses columns: City (raw), Problem, Fix. This table uses columns: City, Bubble location. This table uses columns: Wrong result, Reason, Correction. Values shown are the lesson examples already on this page (not a new dataset).

Fictional sample data. Practice file: visuals_orders_apr_may_2026.csv, dark_stores_maharashtra.csv (source: src/practice/).

Demonstrate

  1. Select City in the Data pane › Column tools › Data category › City.
  2. Add a column Place = [City] & ", Maharashtra, India" in Power Query or DAX.
  3. Set Place Data category to Place (or use City + State + Country in Location).
  4. Use Place in the map's Location well.

Show the result

Your result should look like this (fictional sample):

City Bubble location
Pune, Maharashtra, India Pune (correct)
Nashik, Maharashtra, India Nashik (correct)
Kolhapur, Maharashtra, India Kolhapur (correct)

Explain what happened

Adding state and country removes ambiguity, so the map service returns the Maharashtra match first.

Explore further

  • Latitude/Longitude (15.4) avoids geocoding completely.

Detailed reference for this lesson:

Power BI converts text into coordinates (geocoding) using an online service. A plain "Aurangabad" or "Nagpur" might be matched to a place with the same name elsewhere. Tell Power BI what each column means with a data category.

Steps in Power BI

  1. In Table view or the Data pane, select DarkStore › City.
  2. Column tools › Data category › City.
  3. Set State › State or Province, Country › Country/Region, Pincode (Text) › Postal code, Latitude › Latitude, Longitude › Longitude.
  4. A globe icon appears next to geo-categorised fields in the Data pane.

Other data categories: Address, Continent, County, Place, Web URL, Image URL, Barcode.

Avoid wrong geocoding with a full location column:

Map Location = DarkStore[City] & ", " & DarkStore[State] & ", " & DarkStore[Country]
-- "Sambhaji Nagar, Maharashtra, India"
Store Address = DarkStore[Area] & ", " & DarkStore[City] & ", Maharashtra, India"
-- "Tarabai Park, Kolhapur, Maharashtra, India"

Set Map Location to data category Place (or Address for Store Address) and use it in the map's Location well. You can also build it in Power Query with Merge Columns (Module 7.11).

Got it? "Nagpur, Maharashtra, India" is safer than just "Nagpur". If not, look at the example again.

Ravindra Bagale's Tip

Look, friends: plotting "Nagpur" or "Sambhaji Nagar" without the state can drop the bubble in the wrong place, and renamed places may not be recognised yet. Set the data category, build a full location like "Nagpur, Maharashtra, India", and keep Pincode as Text with the category Postal code. If a bubble still lands wrong, switch to latitude and longitude. Don't make this mistake!

Fix common mistakes

Wrong result Reason Correction
Bubble in another country Ambiguous name Add State and Country, or use coordinates
Two bubbles for one city Spelling variants Standardise spellings in Power Query
Category set but no change Visual uses a different column Use the categorised column in Location

Practise independently

Practice task

Write the Place value you would build for Kolhapur.

Hints
  • City, state, country.
Solution

"Kolhapur, Maharashtra, India" with Data category Place (or City + State + Country fields).

Think like a professional

Geocoding errors are silent – the map still looks fine. Always check one or two bubbles against known locations before publishing.

Ravi Sir's Cards for this lesson

मराठी cards