Group by Country and Rate from Data Table

I have 2 input data table.
Table A:
image

Table B:
image

Output:
image

I have to develop a logic, for data table to group by Country and Rate and accumulate/sum the minutes and amount. It is compared from Table B to Table A. If the country is not found when compared from Table B into Table A, it will be sum into “Others” Destination as in Output. Is there any way linq can do this in simpler method?

Sample 1.xlsx (16.1 KB)

Hi @Aqiff_Shamsul,

Can you tell me in output table why we have two rows of France ?
If we use group by then the value should be distinct right?

Regards,
Firoz

Because its different rate. We need to group by Country and Rate.

Have a look here as for starter help:

In my case, how can I group by the country and rate in this case? Still learning and thinking on how to reapply here

one quick approach could be:

dtMerged = dt2.Copy()
Rename Columns Min, Rate, Amount to Min_B, Rate_B, Amount_B

Merge DataTable Activity:
Merge dt1 to dtMerge

Group and Process the Grouped Rows at dtMerged as described above within the shared Link. We would recommend to start the modelling by applying the NON-LINQ Approach