Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register 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 🤜🤛
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 34 | |
| 33 | |
| 30 |