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

Join us at the 2025 Microsoft Fabric Community Conference. March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for $400 discount. Register now

Ilgar_Zarbali

Developing an Azerbaijan Shape Map

A shape map is a powerful visualization tool that allows users to represent geographical data with customized regions. However, not every country’s shape is readily available in Power BI. By developing a custom Azerbaijan shape map, we can unlock better regional insights and enhance data-driven decision-making.

In this guide, I will walk you through the process of creating an Azerbaijan Shape Map, ensuring that you can effectively map and analyze location-based data.

📥 Downloadable Materials:

https://onedrive.live.com/?authkey=%21AOTKe2P4w9oBvmo&id=357FB5C8090FE1B2%2168360&cid=357FB5C8090FE1...

I am working with a small sales dataset from multiple retail stores across various cities in Azerbaijan, including Baku, Ganja, Shaki, Sumgait, and Nakhchivan.

Let's add another page to the Power BI file and name it "Map."

We need to ensure that the Shape Map icon is visible in the Visualization Pane.

Shape Map Icon.png

If it is not available, we can enable it by navigating to File > Options and Settings > Preview Features and ensuring that the Shape Map Visual option is selected.

Shape Map Visual.png

Click on the Shape Map icon in the Visualization Pane, then add the TotalSales(F) measure. You'll notice that the map defaults to the USA Shape Map.

USA Shape Map.png

Select the map, then go to the Format Pane and choose Map Settings.

Map Settings.png

Click on Map Type, then select Custom Map to upload our map in TopoJSON format.

Custom Map.png

First, let's create our custom map. To do this, search for an Azerbaijan Shapefile using Google Chrome.

Azerbaijan ShapeFile Search.png

Click on the Humanitarian Data Exchange (https://data.humdata.org/dataset/cod-ab-aze) link. From there, download the following files:

📥 AZE_AdminBoundaries_TabularData.xlsx 📥 aze_adm_gadm_osm_20231002_SHP.zip

Open the downloaded Excel file. You'll see that it contains three worksheets, listing the names of all Azerbaijani cities, districts, and ecoregions in both Azerbaijani and English.

Excel File.png

Now, we can upload the Excel file into Power BI, perform the necessary transformations, and apply the changes to our Power BI file.

Upload Excel File.png

Now, open a new tab in Google Chrome and go to mapshaper.org.

Mapshaper.org.png

Click on Select, then upload the downloaded shapefile ZIP to Mapshaper.org.

Click on Export to proceed with saving the transformed shapefile.

Leave the three selected options as they are, then choose TopoJSON as the export format.

Topojson.png

Now, return to your Power BI file to continue with the next steps.

Upload the exported TopoJSON file to the Custom Map in Power BI by selecting Browse under Map Settings.

Now, add ADM1_EN from the recently uploaded Excel file to the Location field in Power BI.

Regions Adding.png

Now, we can add a Slicer to display the cities of Azerbaijan in English. Additionally, let's add a Card visual to show the TotalSales(F) value.

 

Latest View.png

The final step is to create a relationship between the Cities column in the dStores table and the corresponding column in the newly added Excel file in Power BI.

Relationship.png

Conclusion:

Building a custom Azerbaijan Shape Map in Power BI allows for more precise geographical visualizations, enabling better insights into regional sales and trends. By leveraging tools like Mapshaper.org, custom TopoJSON files, and Power BI's Shape Map visual, we can create interactive and dynamic maps tailored to specific datasets. Integrating Excel data, establishing relationships between tables, and using slicers for city-level analysis further enhances the usability of the report.

Mastering the creation and customization of Shape Maps is a valuable skill for any data professionallooking to improve spatial analysis and drive actionable insights. Let us know if this guide was helpful—we’d love to hear your feedback!

Comments

This is more than business intelligence. Well done 👌

Your step-by-step approach makes it easy to follow. Keep up the great work in sharing valuable insights! 

Your guide is clear and well-organized, and it's a perfect way to give users the tools to take full advantage of Power BI's mapping capabilities!