Transform Table before expanding

mduntley

Board Regular
Joined
May 23, 2015
Messages
139
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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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,223,375
Messages
6,171,736
Members
452,419
Latest member
mapa

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