Forum Discussion
How to use a mid-table row as the column headers, while still keeping the above table rows
Good day everyone!
I am relatively new to Power Bi Desktop and am hoping for answers to my current problem.
I've imported data from an Excel Workbook and am now trying to format my data. I've notice that the row I'd like to use as column headers is in the middle of the table and currently I am unsure how to use that row without losing the data entries above it.
Logically, I've deduced that a possible solution would be to delete the row and then to manually rename the column headers myself, but is there not a more dynamically way to do things?
9 Replies
- HughLa
Resolver IV
Hi Anonymous
In the Power Query editor, you should promote the first row to headers after you imported the data.
Hope this helps you.
Hugh
- Idrissshatila
Super User
Hello Anonymous ,
you can use the following to make a random row as header by referencing the number of row and instead of source you reference the previous step if it wasn't the source step
#"Promoted Headers" = Table.PromoteHeaders(Table.Skip(Source,1), [PromoteAllScalars=true])
- AnonymousNot applicable
Haven't resolved it yet and have an idea of what you're hinting at, but could you please explain these steps in abit more detail again
- Idrissshatila
Super User
Anonymous Can you show me the advanced editor in the table you want to adjust the headers and the number of row you want to make the header.
copy past here the code in the advanced editor to here