Forum Discussion
alannavavaldez
1 year agoNew Member
TextAfterDelimiter using another column as the text delimiter
Hello, Sorry to ask, I had been trying and I was not able to do this... is there a way to split column A using column B as delimiter? I was thinking using TextAfterDelimiter but so far no luck. This...
- 1 year ago
It's not a proper split, as you usually sacrifice the delimiter symbol(s)
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wyk0sSS3KTMxRMDQwMFDILFbIyy9RyM9W0oHLKMXqRCslJZYkZygYAhUhFIDFwLIFRfkppcklCoZGEDPA0lBBpdhYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Column A" = _t, #"Column B " = _t]), #"Added Custom" = Table.AddColumn(Source, "Column C Result", each Text.Split([Column A],[#"Column B "]){1},type text) in #"Added Custom"How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done". Once you examined the code, replace the entire Source step with your own source.
Vvelarde
1 year agoCommunity Champion
Another way is using this:
Text.End([Column A], Text.Length([Column A])-Text.Length([Column B])-1), type text)