Forum Discussion

yagusik's avatar
yagusik
Frequent Visitor
6 years ago
Solved

How to extract delimited text from one column based on condition from another?

I have forwarding information stored in the AllForwardingDetails column. Depending on the type of forwarding in the ForwardingType column, I need to extract specific parameters from the AllForwarding...
  • ImkeF's avatar
    ImkeF
    6 years ago

    Yes, sorry, that code couldn't work.

    How about this?:

     

    = Table.AddColumn(
    #"Duplicated Column", 
    "ForwardingDetailsExtract", 
    each if Text.Contains([ForwardingType], "FILESYSTEM") 
    then  Text.BetweenDelimiters([ForwardingType], "; ForwardingPath\", "; ") 
    else if Text.Contains([ForwardingType], "MAIL") 
    then Text.BetweenDelimiters([ForwardingType], "; ForwardingReceiver\", "; ")
    else null)

     

    Otherwise please share a bit more about your table and desired results - it's a bit tough to guess what shall actually happen here.