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

Hi,

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

Sample20230228-1L.zip (10.1 KB)

Regards,

1 Like

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