Transform Table before expanding

mduntley

Board Regular
Joined
May 23, 2015
Messages
134
Office Version
  1. 365
Platform
  1. Windows
Trying to skip the first row and then make a header for the first row

Power Query:
let
    Source = #table({"Placeholder"}, {{"Something"}}),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each Table.FromRecords({
    [Column1 = null, Column2 = null],
    [Column1 = "Color", Column2 = "Shape"],
    [Column1 = "Blue", Column2 = "Square"],
    [Column1 = "Black", Column2 = "Triangle"]
})),
    Custom1 = Table.TransformColumns(#"Added Custom",Table.PromoteHeaders(Table.Skip([Custom],1)))
in
    Custom1

Current
Book1
AB
5Column1Column2
6nullnull
7ColorShape
8BlueSquare
9BlackTriangle
10
Sheet1


Desired Table

Book1
AB
13ColorShape
14BlueSquare
15BlackTriangle
Sheet1
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Power Query:
let
    Source = #table({"Placeholder"}, {{"Something"}}),
    #"Added Custom" = Table.AddColumn(Source, "Custom", each Table.FromRecords({
    [Column1 = null, Column2 = null],
    [Column1 = "Color", Column2 = "Shape"],
    [Column1 = "Blue", Column2 = "Square"],
    [Column1 = "Black", Column2 = "Triangle"]
})),
    Custom1 = Table.TransformColumns(#"Added Custom",{"Custom", each Table.PromoteHeaders(Table.Skip(_))})
in
    Custom1
 
Upvote 0
I want to ask a addition question related to this. I only want to the row where the color is Black
 
Upvote 0

Forum statistics

Threads
1,215,474
Messages
6,125,026
Members
449,204
Latest member
LKN2GO

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