@msalesforce777 Hi. Build datatable for DT2 with 5 columns. Then add the assign activity for DT2 with following statement on right. Hope this helps.
(From d In DT1.AsEnumerable
Group d By k=d(“Id”).toString.Trim Into grp=Group
Let rate = grp.Select(Function (rn) rn(“rate”).toString).toArray
Let action = grp.Select(Function (rn) rn(“action”).toString).toArray
Let row = New Object(){k, rate(0), action(0),If(rate.count>1,rate(1),“”),If(action.count>1,action(1),“”)}
Select DT2.Rows.Add(row)).CopyToDataTable