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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Split a coordinate column with DAX

Hello everybody, how is it going?

 

I have a question that I need help, please. I checked the other threads but got a different result.

 

I need to split a coordinates column that latitude and longitude are delimited by a comma, but i cannot use Power Query.

 

For the longitude, the formula worked perfectly, but for the latitude I got some errors: some values got the divider and others got the divider and the first number from the right.

 

Latitude formula that I used and didn't worked:

latitude  = LEFT('Tabela KM 2'[COORDENADA], len('Tabela KM 2'[COORDENADA]) - find(",", 'Tabela KM 2'[COORDENADA],,0))

 

Longitde formula (that worked):

LONGITUDE = RIGHT ('Tabela'[COORDENADA], len('Tabela'[COORDENADA]) - search(",",'Tabela'[COORDENADA],,0))
 
Sample dataset:
COORDENADALATITUDELONGITUDE
3.8442639,-51.83107293.8442639,--51.837152
3.8350949,-51.83312853.8350949,--51.8331285
2.053552,-50.79284132.053552,-5 -50.7928413

 

 

Thanks in advance everyone!

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

@Anonymous 

Please try

latitude =
VAR String = 'Tabela KM 2'[COORDENADA]
VAR Items =
SUBSTITUTE ( String, ",", "|" )
RETURN
PATHITEM ( Items, 2 )

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

@Anonymous 

Please try

latitude =
VAR String = 'Tabela KM 2'[COORDENADA]
VAR Items =
SUBSTITUTE ( String, ",", "|" )
RETURN
PATHITEM ( Items, 2 )

Anonymous
Not applicable

Hi Tamerj1! Thanks for the response!

Your response brought the longitude, but changing the "2" for "1" on the return solved completely my problem.
Much thanks to you!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.