Best option would be to write this data table to an excel and create pivot table in excel using Studio. Read the pivot table output and will give you the expected result
Follow the same steps included in the below workflow. Dattable2 will have the expected output. You can delete the Total row if not required
we are using excel as an intermediate option to get the required results. This will give the result in same time irrespective of the row count as we are not looping anywhere
