Hi,
I want to split one column into 3 new columns:
Route Departure: Left before 'to '
Route Arrival: Right after 'to ' (please do not include Via *****)
Via: text after the word 'Via' (if any). If there's nothing, just add "N/A - Direct Flight"
Example 1:
Aalborg to Copenhangen
Expected result:
Route Departure: Aalborg
Route Arrival: Copenhangen
Via: N/A - Direct Flight
Example 2:
LAX to CDG via IAH
Expected result:
Route Departure: LAX
Route Arrival: CDG
Via: IAH
I tried my best to create 3 calcs, but it did not do a great job splitting it. Any other thoughts/alternatives?
Route Departure:
- LEFT([Route], FINDSTRING([Route], " to ") - 1)
Route Arrival:
- RIGHT([Route], LEN([Route]) - FINDSTRING([Route], " to ") - 3)
Via:
IF CONTAINS([Route_Arrival], " via ") THEN
MID([Route_Arrival], FINDSTRING([Route_Arrival], " via ") + 5, LEN([Route_Arrival]) - FINDSTRING([Route_Arrival], " via ") - 3)
ELSE
"N/A - Direct Flight"
ENDIF
Could you please send the alteryx workflow please? I'd like to learn how you approach this one. I attached the excel file. Thank you!