March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
Solved! Go to Solution.
Hi @Anonymous
I would recommend handling this further upstream (data source or Power Query).
However, here is a DAX expression you could use for a calculated column:
Latitud Decimal =
VAR DMS = [Latitud Fin] // Ideally prefix with table name e.g YourTable[Latitud Fin]
VAR DMS_Delimited =
SUBSTITUTE ( SUBSTITUTE ( SUBSTITUTE ( DMS, "°", "|" ), "'", "|" ), """", "" )
VAR Grados =
VALUE ( PATHITEM ( DMS_Delimited, 1 ) )
VAR Minutos =
VALUE ( PATHITEM ( DMS_Delimited, 2 ) )
VAR Segundos =
VALUE ( PATHITEM ( DMS_Delimited, 3 ) )
VAR Result = Grados + Minutos / 60 + Segundos / 3600
RETURN
Result
This changes the delimiters to vertical bars, which allow for convenient splitting of the string with the PATHITEM function.
Regards
Hi @Anonymous
I would recommend handling this further upstream (data source or Power Query).
However, here is a DAX expression you could use for a calculated column:
Latitud Decimal =
VAR DMS = [Latitud Fin] // Ideally prefix with table name e.g YourTable[Latitud Fin]
VAR DMS_Delimited =
SUBSTITUTE ( SUBSTITUTE ( SUBSTITUTE ( DMS, "°", "|" ), "'", "|" ), """", "" )
VAR Grados =
VALUE ( PATHITEM ( DMS_Delimited, 1 ) )
VAR Minutos =
VALUE ( PATHITEM ( DMS_Delimited, 2 ) )
VAR Segundos =
VALUE ( PATHITEM ( DMS_Delimited, 3 ) )
VAR Result = Grados + Minutos / 60 + Segundos / 3600
RETURN
Result
This changes the delimiters to vertical bars, which allow for convenient splitting of the string with the PATHITEM function.
Regards
infinitely grateful 🤜🤛
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
91 | |
90 | |
80 | |
49 |
User | Count |
---|---|
160 | |
145 | |
103 | |
72 | |
55 |