Forum Discussion
Cristianst
Nov 28, 2018Copper Contributor
Combine cells when column match
Hi Everyone, I don't know how to explain it well, so I'll show you a table of what I need to do. I have this: Year Model Item Number 1984 A 100 1985 A 100 1986 A 100 1...
SergeiBaklan
Nov 28, 2018Diamond Contributor
It could be done with Power Query
In brief:
- query source table and merge Item Number and Model columns with separator which is definitely not in names of both;
- reference that query and group new column selecting min Year as output;
- same for max Year;
- merge above two queries and split merged Item Number & Model column;
- create new column as Model minYear-MaxYear;
- group on Item Number without aggregation of other columns;
- from resulting tables in each grouped row extract first column of such table as list;
- expand list as values with ", " separator.
Rest is cosmetic, please see attached
- CristianstNov 28, 2018Copper Contributor
Thank you very much for your replies, I'm going to try and replicate them on the full table and let you know.