Forum Discussion
ngct1112
Post Patron
5 years agoPowerQuery - Text before multiple Delimiters
Hi, May I know is there any way I could split text before multiple Delimiters in one function? Original Column Desired Result 1 & 5 1 50 - 1000 50 1000/2000 1000 2000&5000 20...
- 5 years ago
Add a step to extract the text before one of those delimiters, and then modify the code in the formula bar to look like this
= Table.TransformColumns(Source, {{"Column1", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-"})), type text}})
Pat
mahoneypat
Microsoft Employee
5 years agoAdd a step to extract the text before one of those delimiters, and then modify the code in the formula bar to look like this
= Table.TransformColumns(Source, {{"Column1", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-"})), type text}})
Pat
Joris_NL
Helper III
2 years agoIn case other people struggle with changing the 'text before delimiter' line into TransformColumns, like I did, here is some clarification:
= Table.TransformColumns(#"NameOfPreviousQueryStep", {{"Original column you want to edit", each Text.Start(_, Text.PositionOfAny(_, {"&", "/", "-", "any other symbols"})), type text}})
So don't expect to create a new column!