Hi,
i have this, and it work:
(From d In dtOut.AsEnumerable
Group d By k=d(“Field1”).toString.Trim, d(“Field2”).ToString.Trim Into grp=Group
Let cs1 = grp.Sum(Function (x) Convert.ToDouble(x(“Field3”).toString.Trim))
Let cs2 = grp.Sum(Function (x) Convert.ToDouble(x(“Field4”).toString.Trim))
Let ra = New Object(){k,cs1,cs2}
Select dtResult.Rows.Add(ra)).CopyToDataTable
I need to add Field5 to Group by
Group d By k=d(“Field1”).toString.Trim, d(“Field2”).ToString.Trim,d(“Field5”).toString.Trim Into grp=Group
but this return error.
Can anyone help me?
Thanks