Forum Discussion
DaveCor
Helper I
6 years agoRemove duplicates but consolidate data from other columns
Hi folks, First time poster and recent convert to Power BI but using Excel for many years. I have a table that I want to later merge with another table but first I need to do some work to i...
- 6 years ago
Table.Group(PreviousStep, "ID", {{"ADR", each List.Select([ADR], each _ <> "" and _ <> null){0}?}, {"ADV", each List.Select([ADV], each _ <> "" and _ <> null){0}?}})Where PreviousStep is your previous step in the query.
artemus
Microsoft Employee
6 years ago
Table.Group(PreviousStep, "ID", {{"ADR", each List.Select([ADR], each _ <> "" and _ <> null){0}?}, {"ADV", each List.Select([ADV], each _ <> "" and _ <> null){0}?}})
Where PreviousStep is your previous step in the query.
- DaveCor6 years ago
Helper I
Thank you artemus!
I tried a load of different types of "Group By" but couldn't get this to work. As a matter of interest, would it actually be possible to do what I was looking for using the "Group By" window or does it require the code you've provided?
- artemus6 years ago
Microsoft Employee
Can you explain what you are looking for?
You can do anything in a group by that you can do in a normal table.
- HotChilli6 years ago
Community Champion
I think the poster just means can they use the 'Group By' dialog instead of typing in a line of code.
If so, this should do it: