power query rows to columns

adamelston

New Member
Joined
Jul 22, 2016
Messages
31
Hello, please could you let me know how to change selected rows to columns in power query (Office 19). I would like to keep w and value as row but move x y z and associated values to columns.
Many thanks.
A

Column1Column2Column1w valuexyz
w1w1234
x2
y3
z4
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
try

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    IF = Table.AddColumn(Source, "Custom", each if [Column1] = "w" then "w" else "w"),
    Pivot = Table.Pivot(IF, List.Distinct(IF[Column1]), "Column1", "Column2")
in
    Pivot

or

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    w = Table.AddColumn(Source, "Custom", each "w"),
    Pivot = Table.Pivot(w, List.Distinct(w[Column1]), "Column1", "Column2")
in
    Pivot
 
Upvote 0

Forum statistics

Threads
1,223,777
Messages
6,174,464
Members
452,566
Latest member
Bonnie_bb

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