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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
jacques_412
Frequent Visitor

Finding the latitude and longitude of addresses

Hi all

 

I am trying to get the distance from each employees home address to their place of work. For home address, it is broken into 6 columns, including post code, street address, town/city etc. The work address is simply a single column name of work location.

 

I am trying to use bing to calculate the latitude and longitude of each address for each person. Thus, I will have a a column for latitude and longitude for home address and work address, and use another method to calculate the distance. I have tried adding a column in power query with the following:

 

    = Table.AddColumn(#"Inserted Merged Column", "Custom", each Json.Document(Web.Content(http://dev.virtualearth.net/REST/v1/Locations?query= & countryRegion="UK"&PostalCode=Text.from([Addressline6]) & locality=Text.From([Addressline4]) & maxResults=1 &key="AuM2IVexzTdbn5uZ8LR1ruMqCle3e0RO6yfghggfhghnewz5hyCmrM_QZAIYW2eU")))[resourceSets]{0}[resources]{0}[point][coordinates]{0}

 

I get the error: The name 'web.content isn't recognized. Note that I put in a fake key above.

 

Any idea where I am going wrong?

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @jacques_412 ,

 

The function is Web.Contents(...).

 

https://learn.microsoft.com/en-us/powerquery-m/web-contents 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @jacques_412 ,

 

The function is Web.Contents(...).

 

https://learn.microsoft.com/en-us/powerquery-m/web-contents 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.