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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

https://www.linkedin.com/in/luca-d-elicio-74a481158/

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

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors