Sum and count of Excel rows

@Olivera_Kalinic

(From d In nakonfilteradt.AsEnumerable() Group d By k=d(“TEKUĆE STANJE DUGA”).toString.Trim, k1=d("VRSTA KREDITA NA 4 NIVOU").toString.Trim Into grp = Group Let coun = grp.count Let s = grp.Sum(Function(x) If((x(“TEKUĆE STANJE DUGA”).ToString.Trim.IsNumeric),CDbl(x(“TEKUĆE STANJE DUGA”).ToString.Trim),0)).ToString Let ra = New Object(){k,k1,s,coun} Select r = newdt.Rows.Add(ra)).CopyToDataTable()

Change column names if wrong.This groups by both the columns

Please mark the solution if resolved. Else happy to help

cheers