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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
HimaBindhu
New Member

How to create query function for adding latitude and longitude to my data

I my data i am provided with country and provinces.

I dont have latitude and longitude of provinces in my dataset. I wanted to integrate bing maps with my data for pointing out provinces in maps.

How can i add lat and long to my data view and create query for pointing location.

 

Fast replies will be much thankful.

 

Regards,

Hima Bindhu

 

2 ACCEPTED SOLUTIONS
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@HimaBindhu,

You would need to prepare latitude  and longitude data in your data source, then refresh  in Power BI Desktop to bring new columns.

In your scenario, why not directly create map visual using country and province fields? You can set data category for your fields to proper category(country or province).
1.PNG


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

As Lydia said, you will need to prepare your Lat/Long coodorindates in your data sources, even if that is a simple spreadsheet you can import and merge with your data.

 

 

To answer your question @v-yuezhe-msft  the State/Province selection is problematic as it often gets the completely wrong place in the world.  A good example is the data point "Orange" which is a city in New South Wales in Australia.  Power BI commonly gets it confused with Orange County in America.  Often Lat/Long is the only method of guarenteeing the expected outcome.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Microsoft Employee
Microsoft Employee

@HimaBindhu,

You would need to prepare latitude  and longitude data in your data source, then refresh  in Power BI Desktop to bring new columns.

In your scenario, why not directly create map visual using country and province fields? You can set data category for your fields to proper category(country or province).
1.PNG


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

As Lydia said, you will need to prepare your Lat/Long coodorindates in your data sources, even if that is a simple spreadsheet you can import and merge with your data.

 

 

To answer your question @v-yuezhe-msft  the State/Province selection is problematic as it often gets the completely wrong place in the world.  A good example is the data point "Orange" which is a city in New South Wales in Australia.  Power BI commonly gets it confused with Orange County in America.  Often Lat/Long is the only method of guarenteeing the expected outcome.

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 MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors