Forum Discussion
JNelson
Helper II
2 years agoSplit Column to first instance of number only
Hi there! I have a messy column that I need to split off the first instance of digit (the number of digits differs by each row) and leave the rest of the cell contents as is. I tried to Split Co...
- 2 years ago
hi, JNelson
let Source = table_with_messy_column, chars = List.Buffer({"a".."z", "A".."Z", " "}), split = Table.SplitColumn( Source, "Logistics", (x) => Splitter.SplitTextByPositions( {0, List.PositionOfAny(Text.ToList(x), chars, Occurrence.First)} )(x), {"Custom", "Custom.1"} ) in split
AlienSx
Super User
2 years agohi, JNelson
let
Source = table_with_messy_column,
chars = List.Buffer({"a".."z", "A".."Z", " "}),
split = Table.SplitColumn(
Source, "Logistics",
(x) => Splitter.SplitTextByPositions(
{0, List.PositionOfAny(Text.ToList(x), chars, Occurrence.First)}
)(x),
{"Custom", "Custom.1"}
)
in
split