cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrbajana Frequent Visitor
Frequent Visitor

Extract Lat and Log from csv with a google link column

I have a text file with a column that has thousands of records with the google links maps as I show it below:

 

https://www.google.com/maps/place/2%C2%B003'02.4%22S+79%C2%B054'42.5%22W/@-2.0506784,-79.9139984,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d-2.0506784!4d-79.9118097?hl=es

 

In some links there is a different position.

 

How do I extract the latitude and longitude of that link?

 

Marco

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisMendoza Senior Member
Senior Member

Re: Extract Lat and Log from csv with a google link column

This work for your data @mrbajana?

Column = 
VAR countLeftText =
    FIND ( "/@", Table1[hyperlink] ) + 1
VAR leftText =
    LEFT ( Table1[hyperlink], countLeftText )
VAR makeLeftBlank =
    REPLACE ( Table1[hyperlink], 1, countLeftText, "" )
VAR findLat =
    FIND ( ",", makeLeftBlank ) - 1
VAR latText =
    LEFT ( makeLeftBlank, findLat )
VAR findLong =
    FIND ( ",17z", makeLeftBlank, findLat + 1 )
VAR longText =
    LEFT ( makeLeftBlank, findLong - 1 )
RETURN
    longText
1 REPLY 1
ChrisMendoza Senior Member
Senior Member

Re: Extract Lat and Log from csv with a google link column

This work for your data @mrbajana?

Column = 
VAR countLeftText =
    FIND ( "/@", Table1[hyperlink] ) + 1
VAR leftText =
    LEFT ( Table1[hyperlink], countLeftText )
VAR makeLeftBlank =
    REPLACE ( Table1[hyperlink], 1, countLeftText, "" )
VAR findLat =
    FIND ( ",", makeLeftBlank ) - 1
VAR latText =
    LEFT ( makeLeftBlank, findLat )
VAR findLong =
    FIND ( ",17z", makeLeftBlank, findLat + 1 )
VAR longText =
    LEFT ( makeLeftBlank, findLong - 1 )
RETURN
    longText

Helpful resources

Announcements
Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 135 members 1,848 guests
Please welcome our newest community members: