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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply

How can I calculate the province column using country, city and postal code

Hi, 

I have created a geographic map in Power BI using country, city, and postal code. Now, I want to segment the map based on provinces, but this field does not exist in my dataset. I would like to know if there is a way to calculate the province field from the other fields using an API or other methods.

I considered collecting data (city, province) and then merging it, using the city as a common field, but I found that there are many countries so multiple cities .

2 REPLIES 2
lucadelicio
Super User
Super User

Hi @SoukainaELMIRI ,

i think this type of request change from different country.
Otherwise i think you need to download a complete dataset where this information is present in.
For example in Italy you can download the entire dataset of all the city of the country with its attribute like province.
Try to see on the internet if it is present a similar dataset with the infomation you are looking for.

Then you can import and do the merge to add this attribute to your actual dataset.

 I hope i'll help you.

 

Ciao



Luca D'Elicio

LinkedIn Profile

Thank you so much , so there is no automatic solution using bing map API.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.