Forum Discussion
domi25
2 years agoFrequent Visitor
Combine excel files with different columns structure in Power Query
Hi, I want to combine excel files in Power Query. I need to pull from each file two rows Revenue and Category. Each file has different categories. Is it possible to tranform the table in this way? ...
Qasim_Jan
2 years agoFrequent Visitor
Hi@AlienX
Is this doable in PQ UI. If not can you explain the code, please.
Thanks
AlienSx
Super User
2 years ago- Qasim_Jan2 years agoFrequent Visitor
Thanks AlienSx, yes I have seen that video but I was having hard time to digest that code.
- AlienSx2 years ago
Super User
Qasim_Jan Table.Group groups rows of original table by values in Source (to new column "tp") and applies function f to each group of rows. This function itself is simple: removes Source column, transposes (so that Type becomes the first row) and promotes Type to header. Then we expand this