How to Sum up data value in each repeater?

Hi,
I want to get the value for each field and then sum it to the TOTAL field when i click save button in this repeater. The Field is text input.


I tried with this code, but I don’t know how to get the value based on the id of each data in the repeater.

this is my collection field

I am sorry for my bad explanation, hope some one can get my problem and help me to fix it.
Thanks,
Rifai

Hi, get items form dataset then use the reduce method.