Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

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 9
Idrissshatila
Super User
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])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Anonymous
Not 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

@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.

Idrissshatila_0-1698135462480.png

 

copy past here the code in the advanced editor to here

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Anonymous
Not applicable

ExposedAnkles_0-1698135976229.png

 

@Anonymous ,

 

in the last row after the "in" replace the #"Changed Type"  with #"Promoted Headers"



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Anonymous
Not applicable

ExposedAnkles_0-1698137708245.png

 

No dice, unfortunately.

@Anonymous , replace the promoted header line with this

 

#"Promoted Headers" = Table.PromoteHeaders(Table.Skip(#"Changed Type",1), [PromoteAllScalars=true])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Anonymous
Not applicable

ExposedAnkles_0-1698139810423.png

 

This works, but unfortunately, I've lost some of the data

HughLa
Resolver IV
Resolver IV

Hi @Anonymous 

 

In the Power Query editor, you should promote the first row to headers after you imported the data.

HughLa_0-1698133415471.png

 

Hope this helps you.

Hugh

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.