October 12, 2021
January 31, 2022
May I assume that you are somewhat familiar with Power Query?
Let's say you have a table with two columns "Contact" and "ID", you would first group by ID without any form of aggregation. Then, add a custom columns that transpose the nested tables from the previous step and keep only the first rows for each of these. Remove the intermediate columns and expand the last one. A very crude working example is included in the attached file.
Beware. that the last step that expands "all columns" results in hard-coded column names, which isn't very useful if you don't know up front how many columns you need to expand. You could make it dynamic or you just go into the advanced editor, delete the Expand step and press the Expand button again to re-create the step with all columns that exist in the real data set.
Edit: Replaced the attachment, now containing an alternative PQ solution.