Append contents of one column to another in Power Query

datatronics505

New Member
Joined
Nov 26, 2022
Messages
46
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
  3. Mobile
  4. Web
Hi,
I am stuck at appending contents of one column to another in Power Query. In the simplest of examples:
Column1Column2
abcdef

should turn into:

Column1
abc
def
Again, in Power Query.
 
Why do you expect that to return an error?

It works the same as you we're to go split that single line into multiple ones:
Power Query:
T2L = Table.ToColumns(Source),
L = List.Combine(T2L),
L2T = Table.FromColumns(L)
You don't have any other arguments in Table.ToColumns(Source) beside Source. My expectation for an error was when I didn't see the Source as the first argument to a method of the step subsequent to Source.
 
Upvote 0

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi,
I am stuck at appending contents of one column to another in Power Query. In the simplest of examples:
Column1Column2
abcdef

should turn into:

Column1
abc
def
Again, in Power Query.
Try Merge Columns, and post data with XL2BB!
 
Upvote 0
Here's an alternative that only uses "point and click" steps. I add a custom column (=1), then unPivot the two other columns.

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Added Custom" = Table.AddColumn(Source, "Custom", each 1),
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Added Custom", {"Custom"}, "Attribute", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Custom", "Attribute"})
in
    #"Removed Columns"
 
Upvote 0
Solution

Forum statistics

Threads
1,215,439
Messages
6,124,877
Members
449,191
Latest member
MoonDancer

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top