15. Maps: Showing Maharashtra on a Map
15.6 Shape Map with a Custom Maharashtra Map
Start with a problem
Raja wants district-level shading for Maharashtra, but Power BI's built-in maps do not know his district boundaries.
Explain simply
A Shape map shades regions from a TopoJSON file (a map file with region shapes and names). Your data values must match the region names inside the file (the map keys).
Show the data
| District in data | Map key in file | Match? |
|---|---|---|
| Pune | Pune | Yes |
| Nashik | Nashik | Yes |
| Kolhapur | Kolhapur | Yes |
| Aurangabad | Chhatrapati Sambhajinagar | No – needs mapping |
About this data: This table uses columns: District in data, Map key in file, Match?. This table uses columns: District, Shade. 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
- Enable the Shape map preview feature (15.2) and insert Shape map.
- Location
District, Color saturationTotal Sales. - Format › Map settings › Map type Custom map › add your TopoJSON file (licence must allow reuse).
- Click View map keys and compare with your District values.
- Fix non-matching names with a mapping table in Power Query.
Show the result
Your result should look like this (fictional sample):
| District | Shade |
|---|---|
| Pune | Darkest (₹850) |
| Nashik | Dark (₹800) |
| Kolhapur | Lighter (₹450) |
| Other districts | Blank (no sales in file) |
Explain what happened
Power BI joins your District text to the map keys by exact text. Matching names get the colour; unmatched names stay blank without a warning.
Explore further
- Keep the TopoJSON file and its licence note in the project folder.
Detailed reference for this lesson:
Steps in Power BI
- Enable the preview feature (15.2) and insert Shape map.
- Location = District, Color saturation = Total Orders.
- Format visual › Map settings › Map type › Custom map › + Add map type › upload a Maharashtra districts TopoJSON file (from an open-data source whose licence allows reuse).
- View map keys shows the region names inside the file. Your District values must match them exactly (clean spellings first, Module 7.9).
Ravindra Bagale's Tip
Friends, many students download a Maharashtra shape file with district names that don't match their data (old names, different spellings). Check the map keys in the shape file and create a mapping column so every district matches, otherwise districts stay blank without any warning. Keep this in mind!
Ravindra Bagale's Tip – मराठी
मित्रांनो, बरेच students अशी Maharashtra shape file download करतात जिच्यातली district names त्यांच्या data शी जुळत नाहीत (जुनी नावं, वेगळी spellings). Shape file मधल्या map keys चेक करा आणि प्रत्येक district जुळेल असा mapping column बनवा, नाहीतर districts कोणतीही सूचना न देता blank राहतात. लक्षात ठेवा!
Ravindra Bagale's Tip – हिंदी
दोस्तों, बहुत से students ऐसी Maharashtra shape file download करते हैं जिसके district names उनके data से मेल नहीं खाते (पुराने नाम, अलग spellings). Shape file की map keys check करो और ऐसा mapping column बनाओ जिससे हर district मेल खाए, वरना districts बिना किसी चेतावनी के blank रहते हैं. ध्यान रखना!
Fix common mistakes
| Wrong result | Reason | Correction |
|---|---|---|
| District stays blank | Name does not match the map key | Use a mapping column to the exact key |
| Shape map not in gallery | Preview feature off | Enable it and restart |
| Using a file with unclear licence | Downloaded from an unknown site | Use an open-data source whose licence allows reuse |
Practise independently
Practice task
What would you do if the file key is Chhatrapati Sambhajinagar but your data says Sambhaji Nagar?
Hints
- Module 7.9 mapping table.
Solution
Add a mapping row Sambhaji Nagar → Chhatrapati Sambhajinagar and use the mapped column in Location.
Think like a professional
Boundary names change over time. Note the map file's date and source in the report's documentation page.
Revision card