Shreesurya
Board Regular
- Joined
- Jul 7, 2014
- Messages
- 50
Hi,
I am Merging 2 columns in Power query and its being repeated for rest of the table.
Col A & B are merged and then C&D and then E &F, finally i will have 3 Columns from 6 Columns.
Problem here is when I merge every time new line of code being created. is there a possibility in Power query to use Nested Merge and have just one line of code instead of having each line for every merge I do.
I am Merging 2 columns in Power query and its being repeated for rest of the table.
Col A & B are merged and then C&D and then E &F, finally i will have 3 Columns from 6 Columns.
Problem here is when I merge every time new line of code being created. is there a possibility in Power query to use Nested Merge and have just one line of code instead of having each line for every merge I do.
Power Query:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Merged Columns" = Table.CombineColumns(Table.TransformColumnTypes(Source, {{"Column1", type text}, {"Column2", type text}}, "en-US"),{"Column1", "Column2"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"A"),
#"Merged Columns1" = Table.CombineColumns(Table.TransformColumnTypes(#"Merged Columns", {{"Column3", type text}, {"Column4", type text}}, "en-US"),{"Column3", "Column4"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"B"),
#"Merged Columns2" = Table.CombineColumns(Table.TransformColumnTypes(#"Merged Columns1", {{"Column5", type text}, {"Column6", type text}}, "en-US"),{"Column5", "Column6"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"C"),
#"Merged Columns3" = Table.CombineColumns(Table.TransformColumnTypes(#"Merged Columns2", {{"Column7", type text}, {"Column8", type text}}, "en-US"),{"Column7", "Column8"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"D"),
#"Merged Columns4" = Table.CombineColumns(Table.TransformColumnTypes(#"Merged Columns3", {{"Column9", type text}, {"Column10", type text}}, "en-US"),{"Column9", "Column10"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"E"),
#"Merged Columns5" = Table.CombineColumns(Table.TransformColumnTypes(#"Merged Columns4", {{"Column11", type text}, {"Column12", type text}}, "en-US"),{"Column11", "Column12"},Combiner.CombineTextByDelimiter("", QuoteStyle.None),"F")
in
#"Merged Columns5"