Forum Discussion
transform sub heading in power query
I have a data like this with sub headings in a single sheet, i need to have them in PQ to sumarize how to convert the sub heading into a column
Well, below are the steps that you might want to follow to achieve your goal.
1. From the Data tab select "From table/Range" (assuming you've got the Excel sheet open)
2. Power Query window will be opened, now select the column that has the subheading, and from "Transform Tab" click "Unpivot"
3. Now use "Use first row as header" option and then rename the "Attribute" column to a proper name.
I am adding a GIF for your better understanding.
Follow same technique for the rest of your subheader in the sheet and then use "Append" queries to append the tables as your table structure is same.
Let me know if you have any further questions.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.