How to Restructure a Datatable to convert from Row to Row and Row Count (Group By Count Operation)?

I have a Datatable which has Rows like this:

I want to convert this table to a new table that contains unique row Names and their counts that appeared in the previous table, like this:

giving some starter help:

Prepare with a build datatable activity the target column structure by configuring an empty datatable with the two cols: PromLang, Count - dtResult

Assign activity
LHS: dtResult

(From d in YourDataTableVar.AsEnumerable
Group d by k=d("PrimaryLanguague").toString.Trim into grp=Group
let ra = new Object(){k, grp.Count}
Select r= dtResult.Rows.Add(ra)).CopyToDataTable
1 Like

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