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.
I would like to merge them as in the attached excel file.
The red font indicates what the data is in its original form.
The yellow highlighted is how I want the data to end up as one complete record.
Thank you for your interest in the problem.
Regards,
Sumair
The kind of issue that definitively requires > 1 example... Put together something (attached) with what you provided + added a couple of extra broken records
NB: When a [Transaction Number] is broken as 2 records (what you gave us with: when a record is broken into two rows)
- The 2 records must be consecutive in the Source Table/file (otherwise I don't see how you're going to resolve this...)
- The 2nd partial record is "added" to the 1st available location in the previous record
- SumairChughtaiJul 24, 2021Copper Contributor"The 2 records must be consecutive in the Source Table/file (otherwise I don't see how you're going to resolve this...)"
Yes. These are two consecutive records in the master data file that I'm working on.
"The 2nd partial record is "added" to the 1st available location in the previous record"
Kindly educate me on how to achieve that in Power Query- LorenzoJul 24, 2021Silver Contributor
Riny_van_Eekelen used the following table structure as input/Source:
and I used a different one:
At the end we get what you expect BUT the approaches (while similar) are necessarily different
So could you please clarify 2 things:
- What's the exact structure of your input/Source table? Riny's one? Mine or something else?
Could you post a picture (a few rows only) of you actual input/Source table to clarify things- What do you exactly have in mind when you say "Kindly educate me on how to achieve that in Power Query"?
Thanks
- SumairChughtaiJul 24, 2021Copper Contributor
The structure you shared is the correct one. This structure defines my problem
1) Row 3 is broken into Row 3 and Row 4
2) The highlighted bit should be in Row 3 in the same order starting after CP Long Name i.e. after PQRST
I want to learn how to merge these two rows together such that all the values appear in the correct columns.
Regards,
Sumair
- SumairChughtaiJul 24, 2021Copper Contributor
Lorenzo That is exactly how I like the data to be. Kindly share how you were able to get to this form in Power Query.
Thank You!