Forum Discussion
Merging Rows in Power Query
- Jul 24, 2021
SumairChughtai Perhaps like in the attached file. I assumed that the raw looks like in the blue table. The Power Query output is in the green table, using only standard UI commands.
IMHO, key question here are there any rules and logic in filling source data. If not, screenshot could illustrate current state, but next day another person adds data in different way - any solution stops working.
- SergeiBaklanJul 24, 2021Diamond Contributor
Attached is one variant, tried to avoid list functions in table transformations due to poor performance, only for columns rename.
- SumairChughtaiJul 24, 2021Copper Contributor
Lorenzo SergeiBaklan Riny_van_Eekelen
The data is generated by my Company's source system. There's no manual or anyother kind of intervention.
Obviously, I can't share more than what I have. However, it serves the purpose of defining the problem.
The output from the source system sometimes breaks records into two rows (as in the excel file attached), with values in incorrect columns as well.
Since there is a significant amount of data, I require a solution via Power Query to merge such rows and create a single record, for each transaction, with the values in the correct columns.
Lorenzo Your solution is what I'm looking for, it created a single record with all values in the correct columns.
Lorenzo Riny_van_Eekelen Riny's solution (in the green table) merged the two rows together into a single record, with all values in the correct columns.
Requesting how to achieve your results in Power Query.
Regards,
Sumair