r/ExcelPowerQuery • u/r10m12 • Aug 13 '25
Specific data from rows to columns
Hi,
I have this big file loaded into Power query. It's item related.
There are mostly a few rows for each item as you can see on the print screen under 'CURRENT'
My goal is to change this in power query [since it's already loaded in PQ to perform other additional changes] to achieve the layout as displayed under 'DESIRED'.
Additional info,
-Same Item can have one or more rows [mostly <6]
-COL2 can be empty
-Only the COL2 with values are wanted in it's own column. But that's not mandatory, empty column from empty field is also okay
If it helps to achieve this, I may create Nth columns on forehand to be filled with the COL2 value, that's no problem.
Any idea or advice that may help me to achieve this?

View all comments
Show parent comment
2
u/r10m12 Aug 14 '25
Holiday time gives some air to dive into specific issues you had no time for before....
Thanks u/declutterdata, looks amazing. Sorry it took so much of your time.
I will have a look at it and try to implement on my business data.
One small thing upfront,
I load the data from a external excel workbook, would it be easy to replace the source details by the code that is usually used when done so? [the 'Source = Excel.Workbook(File.Contents(....' part with the promote header and so.
Again, much appreciated and thanks.