Forum Discussion
Remove Duplicates after merging tables
I have what is probably a really dumb issue, but I am a powerquery/DAX noob. 🙂
I am taking several datasets with data that looks like this:
| Machine Name | Operating System | Domain |
| ABCD1234 | Windows 10 | domain.company.com |
and appending them together to create a 'master list' of machine name.
When I append the data tables together and 'remove duplicates' on column #1, i can't get it to remove duplicates, because they'll be formatted like this:
| Machine Name | Operating System | Domain |
| ABCD1234 | Windows 10 | domain.company.com |
| ABCD1234 | Windows 10 Enterprise | domain.company.com |
I don't care which one it keeps, but I am assuming as long as theres another column with different data it will never see that 2nd row as a duplicate.
If I start with each table, and try to merge the queries, It wont let me consolidate the columns either.
E.g. it will do this:
| Machine Name | Operating System | Operating System.1 |
| ABCD1234 | Windows 10 | Windows 10 Enterprise |
Do I have to merge the sources and then somehow concatenate the columns down to 1? I don't know how to scrub that as it's going to be a mix of nulls and some where it gets results for each table.
Thanks in advance!!
- Anonymous4 years ago
I just realized i never tried the "Clean" option. No idea what that changed but it may have worked.
I swear I tried trim and all those others 100 times but I guess I must have had some weird extra character. I even exported the data and didn't see any but alas... there we go. sigh. 🤦♂️🤦♂️
Thanks!
4 Replies
- parry2k
Super User
Anonymous it should remove duplicates if you are doing on column 1 (Machine Name)
- parry2k
Super User
Anonymous
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- AnonymousNot applicable
I just realized i never tried the "Clean" option. No idea what that changed but it may have worked.
I swear I tried trim and all those others 100 times but I guess I must have had some weird extra character. I even exported the data and didn't see any but alas... there we go. sigh. 🤦♂️🤦♂️
Thanks!
- parry2k
Super User
Anonymous I was going to ask that but I thoughtt you know what you are doing. Anyhow, it is solved that's all matter.
✨ Follow us on LinkedIn
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡