Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a table called Country and it has following data
CountryKey | Country Name |
1 | Australia |
1 | Aus |
2 | United States |
2 | USA |
3 | Canada |
3 | Can |
and want convert data like:
CountryKey | Country Name |
1 | Australia |
2 | United States |
3 | Canada |
Which function should you use in the query for Country Table:
Table.RemoveMatchingRows
Table.Distinct [Is this right]
Table.InDistinct
Table.ReplaceMatchingRows
https://docs.microsoft.com/en-gb/powerquery-m/table-distinct
I tried: Edit Queries-->Select your table-->Select Column-->Right Click-->Remove Duplicates--> then go to Advance Editor--> and found that #"Removed Duplicates" = Table.Distinct(#"Changed Type", {"CountryKey"})
Solved! Go to Solution.
Hi @Anonymous ,
Based on my test, the Table.Distinct is right.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Does that make sense? If so, kindly mark my answer as a solution to help others having the similar issue and close the case.
Best regards
Amy Cai
Hi @Anonymous ,
Based on my test, the Table.Distinct is right.
Best Regards,
Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |