Forum Discussion
Excel Column Splitting
- Anonymous2 years ago
Hi Anonymous
This is my solution. You may have a try!
let Source = Excel.CurrentWorkbook(), Table2 = Source{[Name="Table1"]}[Content], #"Changed Type" = Table.TransformColumnTypes(Table2,{{"Contact name", type text}, {"Job Title", type text}}), #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [Contact name] <> null and [Contact name] <> ""), Custom1 = Table.FromColumns(List.Transform(Table.ToColumns(#"Filtered Rows"), each List.Combine(List.Transform(_, each Text.Split(_, "#(lf)")))), {"Contact Name", "Job Title"}) in Custom1From
into
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Use this query as your next step. Replace Source with your previou step name.
= Table.FromRecords(List.Transform(Table.ToRecords(Source), (x)=> Record.TransformFields(x, {"Column1", each Text.Trim(Text.AfterDelimiter(x[Column1], ".", 0))})))
- Anonymous2 years agoNot applicable
Hi Vijay - not clear. These are my column names "Contact name" and "Job Title". Can you pls. suggest complete step that can give the desired result from the existing format.
I tried this (but error):
let
Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content],
#"Changed Type" = Table.FromRecords(List.Transform(Table.ToRecords(Source, {{"Contact name", type text}, {"Job Title", type text}}), (x)=> Record.TransformFields(x, {"Contact name", each Text.Trim(Text.AfterDelimiter(x[Contact name], ".", 0))})))in
#"Changed Type"- Vijay_A_Verma2 years agoMost Valuable Professional
Use this
let Source = Excel.CurrentWorkbook(){[Name="Table2"]}[Content], #"Changed Type" = Table.FromRecords(List.Transform(Table.ToRecords(Table.TransformColumnTypes(Source,{{"Contact name", type text}, {"Job Title", type text}})), (x)=> Record.TransformFields(x, {"Contact name", each Text.Trim(Text.AfterDelimiter(x[Contact name], ".", 0))}))) in #"Changed Type"- Anonymous2 years agoNot applicable
Still this error: