Help creating aggregate report - group by count

HI,

Can you try the following sample?

dt.AsEnumerable.GroupBy(Function(r) Tuple.Create(r(0).ToString,r(1).ToString,r(2).ToString,r(3).ToString)).Select(Function(g) dtResult.LoadDataRow({g.Key.Item1,g.Key.Item2,g.Key.Item3,g.Key.Item4,g.Any(Function(r) r("Class Finals").ToString.ToLower="true" ),g.Count(Function(r) not String.IsNullOrWhiteSpace( r("Subject").ToString)),g.Any(Function(r) r("Due Resits").ToString.ToLower="true")},False)).CopyToDataTable

Sample20240127-1aV2.zip (15.7 KB)

Regards,

3 Likes