Forum Discussion
jerryr125
1 year agoHelper IV
Creating a header from the first two rows
Hi - I know in Power Query you can "Use First Row as headers" function. Is there a way to use the first two rows as headers (combine both rows to create one header row). Example: a b c...
- 1 year ago
Here's another solution you could refer to. Thanks
dufoq3
1 year agoCommunity Champion
Hi jerryr125, another solution:
Add this code as a new step, replace Source in code with your previous_step_name if necessary.
= Table.PromoteHeaders(Table.FromColumns(List.TransformMany(Table.ToColumns(Source),
each {List.Skip(_, 2)},
(x,y)=> {Text.Combine(List.FirstN(x, 2))} & y)))