Forum Discussion
davidmaddock54
Dec 29, 2021Brass Contributor
Turning alternate rows into columns - Power Query/M Function
So I have some messy data coming from pdf invoices which I have 95% cleaned how I want, but I cannot work out the last step. I am copying the data into a table with ctrl a/c/v and it spits it int...
- Dec 29, 2021
davidmaddock54 The attached workbook contains a working query that does what you asked for. I trust you can get it to work in your own schedule.
It involves adding an Index column from zero. Then a Modulo of 2 on the Index, creating a column with alternating zeroes and ones. Pivot the Modulo column without aggregation of Column1 and do some cleaning up.
Riny_van_Eekelen
Dec 29, 2021Platinum Contributor
davidmaddock54 The attached workbook contains a working query that does what you asked for. I trust you can get it to work in your own schedule.
It involves adding an Index column from zero. Then a Modulo of 2 on the Index, creating a column with alternating zeroes and ones. Pivot the Modulo column without aggregation of Column1 and do some cleaning up.
davidmaddock54
Dec 29, 2021Brass Contributor
Thanks so much. I get an error when I open the query editor, but I think I can follow the steps in the formula bar. It certainly spits out what I want at the end.