I have a collection created with duplicate records. Distinct give me single column record which I do not want.
I just want to remove duplicate rows from collection based on one column but it should return collection again(not one column)
how to remove duplicates from collection?
Thanks for the question.
Currently I can't find a way available to remove duplicate records from collection in PowerApps.
The only function that would work with the Duplicate records is Distinct function, and it will only return single columns.
We could archive the duplicate records by using GrouPBy function:
GroupBy and Ungroup functions in PowerApps
Please check to see if the groupby function could be a workaround.
In addition, please also submit an idea regarding delete the duplicate records.
I found a way to remove duplicates. It is not efficient, but it works!
1- create a column in the collection that concatenates all values that can define the tuple as unique.
2 - create a "temporary" collection with the distinct values from this new column.
3- execute a loop in this tempCol and filtering and getting the first values from the originalCollection, and storing them in a second "temporary" collection.
ForAll(tempCol,Collect(tempCol2,First(Filter(originalCollection , NEWCOLUMN=Result))));
4- Replace the originalCollection by the second "temporary" collection.
5- its done! you have a new collection with all duplicated values removed.
OBS: Make sure you concatenated the correct columns in order to make the tuple unique.
Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.
Fill out a quick form to claim your user group badge now!
Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities
Features releasing from October 2019 through March 2020
Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.
Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications