Hello Friends,
I have Products and its count.
I need unique value and its sum as shown in screenshot.
I am attaching excel sheet for your reference.
Please provide best way to solve this.
Find uniq value and sum.xlsx (9.3 KB)
Thanks in advance
Hello Friends,
I have Products and its count.
I need unique value and its sum as shown in screenshot.
I am attaching excel sheet for your reference.
Please provide best way to solve this.
Find uniq value and sum.xlsx (9.3 KB)
Thanks in advance
Please try this
Assign 1 - Newdt = dt.Clone()
Assign 2
NewDt = (From d In dt.AsEnumerable
Group d By k=d("Products").toString.Trim.ToLower Into grp = Group
Let c = grp.Sum(function(x) Cint(x("Count")ToString)).ToString
Let ra = New Object(){k,c}
Select r = Newdt.Rows.Add(ra)).CopyToDataTable
cheers