0

im trying to merge rows values based on equal categories. for example the following table:

enter image description here

i want to group by the values from column "note" based on the "code" column so the table will look as follow:

enter image description here

is there a way i can do it with power query build in options or it must be function I build my own?

thanks!

Community
  • 1
  • 1
Orweisman
  • 161
  • 5
  • 10
  • 1
    You can achieve this in a pivottable, using a DAX measure (CONCATENATEX). Have a look at my answer to [this](https://stackoverflow.com/questions/53171336/how-to-transpose-all-subfields-in-front-of-the-parent-field-of-a-pivot-table-in/53172624#53172624) question – Marco Vos Nov 13 '18 at 10:29
  • @Marco Vos thanks! exactly what i needed! – Orweisman Nov 13 '18 at 12:04
  • I've posted how to do this in the query editor before too. See [here](https://stackoverflow.com/questions/52708114/power-query-data-transformation-from-a-single-column-to-a-whole-table/) or [here](https://stackoverflow.com/questions/49781281/power-query-nested-table-to-string/). – Alexis Olson Nov 13 '18 at 14:57

1 Answers1

0

To do this in the query editor, you can Group By the code column and then modify the aggregator to use Text.Combine to do the concatenation on the note column.

I've explained this in more detail in the middle step of this answer.

Alexis Olson
  • 38,724
  • 7
  • 42
  • 64