Forum Discussion
Transpose rows, distributing them in columns? / Transpor linhas, distribuindo-as em colunas?
- Apr 18, 2023
Steps TableSplit through CombinedTables cannot be done with the Power Query User Interface, you have to implement them with the Advanced Editor
In the attached file I updated the query to add some comments (lines start. with //), this gives:
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], // Remove empty rows: RemovedNull = Table.SelectRows(Source, each ([Column2] <> null)), // Split the table every 7 rows ==> A list of Tables: TableSplit = Table.Split(RemovedNull, 7), // Iterate over the list to Transpose each item (each Table): TransposedEachTable = List.Transform(TableSplit, Table.Transpose), // Combine list items as a Table: CombinedTables = Table.Combine(TransposedEachTable) in CombinedTablesPower Query doc. is available here. Any specific question re. the above query let me know
And good luck with PQ, learning it is a journey...
Yes! I would like to know how you did each step, some buttons I couldn't find, I spent almost 1 hour looking, so as not to bother you
Steps TableSplit through CombinedTables cannot be done with the Power Query User Interface, you have to implement them with the Advanced Editor
In the attached file I updated the query to add some comments (lines start. with //), this gives:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
// Remove empty rows:
RemovedNull = Table.SelectRows(Source, each ([Column2] <> null)),
// Split the table every 7 rows ==> A list of Tables:
TableSplit = Table.Split(RemovedNull, 7),
// Iterate over the list to Transpose each item (each Table):
TransposedEachTable = List.Transform(TableSplit, Table.Transpose),
// Combine list items as a Table:
CombinedTables = Table.Combine(TransposedEachTable)
in
CombinedTables
Power Query doc. is available here. Any specific question re. the above query let me know
And good luck with PQ, learning it is a journey...
- luccagrtt501stApr 18, 2023Copper ContributorI figured I wouldn't have to learn about the language/Advanced Editor... It's going to be a job.
But you really helped me a lot!
Thanks!
Hugs from Brazil!- LorenzoApr 18, 2023Silver ContributorGlad I could help & Thanks for providing feedback