Forum Discussion
Split
- 4 years ago
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCi5JLCpRSMsvytUJKMrMTc0syldIzs8rSSzJV3AMdgxAiKZkJiqkpMIklXSUjAyMDHUNzHUNTUIMDKyMzK0MzbWBDAMDHUwZC6wyxmZWJlAZpVgd6jjGIsTAELtj4DIYjgHLoDgmFgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [phase_history = _t, first_time_in = _t]), ToRows = Table.ToRows(Source), #"Split Rows" = let cols = Table.ColumnNames(Source) in List.Transform(ToRows, each Table.FromColumns(List.Transform(_, each Text.Split(_, ",")), cols)), #"Combined Tables" = Table.Combine(#"Split Rows") in #"Combined Tables"
CNENFRNL I don't know how I could implement this in my code. I don't just have these 2 columns, I have others too, my code is something like this:
let
Source = Sql.Database(" "),
PipedeVendas = Source{[Schema=" ",Item="PipedeVendas"]}[Data],
#"Removed Other Columns" = Table.SelectColumns(PipedeVendas,{"card_id", "title", "valor_do_deal", "ultimo_conteudo", "fonte", "phase_history", "first_time_in", "ultimo_termo", "ultima_campanha"}),
#"Extracted Text Between Delimiters" = Table.TransformColumns(#"Removed Other Columns", {{"phase_history", each Text.BetweenDelimiters(_, "[", "]"), type text}, {"first_time_in", each Text.BetweenDelimiters(_, "[", "]"), type text}})
in
#"Extracted Text Between Delimiters"
Hi Anonymous ,
You can use split with delimiter.
If you need help on splitting, provide a workable data.
Thank you.
- Anonymous4 years agoNot applicable
- Anonymous4 years agoNot applicable
Hi Anonymous
I think CNENFRNL 's reply has shown you a correct way to solve your problem. ToRow,Split Rows and Combined Tables.
It seems that I don't have access to your data source. I couldn't do transform in Power Query Editor. If you still have problem, you can build a sample by Enter Data instead of Get data.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.