Need help in getting calculated values in a data table column without looping and grouping based on another column

have a look here for some more trainings

with the reuse of the calculated sums the dictionary approach from @Yoichi is a recommendable approach for this case