Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 it. Unfortunately I've spent hours scouring forums and videos and can't find a solution so would appreciate some help.
My data looks like this (tried using the table feature on this forum but kept getting an error so had to use an image)
How can I consolidate the data so that all duplicates are removed from the ID column and the values from the ADR & ADV columns end up on the same row so the end result looks like this
Appreciate any help with this
Solved! Go to Solution.
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.
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.
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?
Can you explain what you are looking for?
You can do anything in a group by that you can do in a normal table.
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: