Forum Discussion
Combine multiple row fields in Power Query based on multiple other field conditions
That is a DAX solution, not Power Query. I'd use CONTATENATEX() for the measure, filtering on the current PO number, the lines that are above the line number SS is on, then concatenate the values in the Line Desc. field.
I'd need data to play with though. A clean excel file shared via OneDrive or Dropbox. I or someone else could take a crack at it.
Power Query is not designed to do column scans like you are wanting. DAX is ideally suited for that.
Hi
Hopefully this file shares ok.
The SN type lines are ok as is, and don't need to be combined with any other lines, as for these items they have a description on the PO line itself.
I should point out that both the "PO NO." & "Backorder" fields need to match (the line above) for the line to be valid for joining the line descriptios. I can bring in the table sorted, but essentially the line descriptions are joined on numerical sequence of "Line Seq", "DN" types down separated by a space, until a "SS" type is reached where we then want the combined descirption.
I hope this all makes sense, let me know if it doesn't
Cheers