Are you looking for something like this model share?
Update
So you say: SumPrice(n) = price(n-1) + price(n). I will assume that price(-1) = 0, and I have initialized the variable SumPrice to that value.
The first action in the loop calculates SumPrice(n): SumPrice at that point in time holds price(n-1) and you add price(n).
You can then do something with SumPrice(n). I simply assign it to OrderLine/SumPrice attribute, but you could call a microflow with this as input parameter etc.
Finally, I set SumPrice to price(n), so that it is prepared for the next iteration of the loop: in the next iteration, I start by adding price(n) to this value, which, in that iteration, is price(n-1).
I rebuild your Microflow, but in mine something went wrong.
This is my Microflow, do you know where i have to commit Activities in the Loop and where not ?
With the Button I call the Microflow in this case all values are the same. And thats not the favored behavior. Maybe you can detect my fault with the snapshot.
Up to this thanks for your help!