Hi @scherrie The calculation should just work fine for you as you indicated.
On this question;
Have a look at the use of indexed-repeat as explained in our articles and discussions in the forum here.
Stephane