Forum Discussion
Use particular row as header
- Anonymous2 years ago
Hi Anonymous ,
If you are making a change to a row I think you can do it in Power Query by first deleting all the rows above the row you want to use as a title. If there is only the desired row at the top, use the "Use first row as Headers " option to elevate that row to a title.
In case of multiple columns, I think you can use M-code, the following M-code will hopefully help you.
let Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content], PromoteHeaders = Table.PromoteHeaders( Table.Skip(Source, List.PositionOf( List.Transform(Source[Column1], Text.Upper), "ID" ) ) ) in PromoteHeadersBest Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
If you are making a change to a row I think you can do it in Power Query by first deleting all the rows above the row you want to use as a title. If there is only the desired row at the top, use the "Use first row as Headers " option to elevate that row to a title.
In case of multiple columns, I think you can use M-code, the following M-code will hopefully help you.
let
Source = Excel.CurrentWorkbook(){[Name="YourTableName"]}[Content],
PromoteHeaders = Table.PromoteHeaders(
Table.Skip(Source,
List.PositionOf(
List.Transform(Source[Column1], Text.Upper),
"ID"
)
)
)
in
PromoteHeaders
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.