How to count the values in a column 1 based on column 2 and transpose row to column

I am looking solution something like this


Can you try the following sample?

dt = dt.AsEnumerable.GroupBy(Function(r) r("Department").ToString).Select(Function(g) dt.Clone.LoadDataRow({g.Count,g.Key},False)).CopyToDataTable (10.1 KB)


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.