Forum Discussion
splitting multiple delimiter in column & find max
- 9 years ago
It's not completely clear what you are trying to achieve; I assume that each value has 2 numbers that are separated by a delimiter, and you want the left and right numbers in separate columns.
The menu-option won't let you enter multiple delimiters, but you can enter one delimiter and then slightly adjust the generated code: I changed:
Splitter.SplitTextByDelimiter to Splitter.SplitTextByAnyDelimiterthe delimiter by a list of delimiters (comma separated and surrounded by curly brackets {}
let Source = #table(type table[Data = text],List.Zip({{"123&456","223/553","229-30"}})), #"Split Column by Delimiter" = Table.SplitColumn(Source, "Data", Splitter.SplitTextByAnyDelimiter({"&","/","-"}, QuoteStyle.Csv), {"Data.1", "Data.2"}) in #"Split Column by Delimiter"
It's not completely clear what you are trying to achieve; I assume that each value has 2 numbers that are separated by a delimiter, and you want the left and right numbers in separate columns.
The menu-option won't let you enter multiple delimiters, but you can enter one delimiter and then slightly adjust the generated code: I changed:
Splitter.SplitTextByDelimiter to Splitter.SplitTextByAnyDelimiter
the delimiter by a list of delimiters (comma separated and surrounded by curly brackets {}
let
Source = #table(type table[Data = text],List.Zip({{"123&456","223/553","229-30"}})),
#"Split Column by Delimiter" = Table.SplitColumn(Source, "Data", Splitter.SplitTextByAnyDelimiter({"&","/","-"}, QuoteStyle.Csv), {"Data.1", "Data.2"})
in
#"Split Column by Delimiter"- timrodman8 years ago
Helper I
Thank you so much for this solution MarcelBeug it helped me a lot!