Filter/Select Non Duplicate Values

@kuppu_samy
Below a more detailled description on how to do (1 column, List approach)


Build Datatable - just simulating Excel readin, giving a Datatable
1. Assign: creating a string list from the Numbers column
dtData.AsEnumerable.Select(Function (row) row(“Numbers”).toString.Trim).toList
2. Assign: retrieving the duplicates:
(From s In Numbers
Group s By no=s Into Group
Select no, count=Group.Count
Where count>1
Select no).ToList
3. Assign filtering out the dplicates from the Numbers
Numbers.Except(Duplicates).toList

Find XAML here: kuppu_samy.xaml (9.1 KB)

Kindly note: same approach with Except can also be shifted to Datatable base with e.g. more columns. If help is needed on that just ping us. Let us know your feedback

2 Likes