Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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?
Hello @ExposedAnkles ,
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])
Proud to be a Super User! | |
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
@ExposedAnkles 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
Proud to be a Super User! | |
in the last row after the "in" replace the #"Changed Type" with #"Promoted Headers"
Proud to be a Super User! | |
No dice, unfortunately.
@ExposedAnkles , replace the promoted header line with this
#"Promoted Headers" = Table.PromoteHeaders(Table.Skip(#"Changed Type",1), [PromoteAllScalars=true])
Proud to be a Super User! | |
This works, but unfortunately, I've lost some of the data
In the Power Query editor, you should promote the first row to headers after you imported the data.
Hope this helps you.
Hugh
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
108 | |
101 | |
93 | |
69 |
User | Count |
---|---|
172 | |
135 | |
132 | |
101 | |
95 |