# Addition in a fori

**URL:** https://community.silverfin.com/t/addition-in-a-fori/1697
**Category:** Templates
**Created:** [March 6, 2020, 11:33am UTC](https://community.silverfin.com/t/addition-in-a-fori/1697 "2020-03-06T11:33:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Loic\_Cogels](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@Loic\_Cogels](https://community.silverfin.com/u/Loic_Cogels)
#### Post date: [March 6, 2020, 11:33am UTC](https://community.silverfin.com/t/addition-in-a-fori/1697/1 "2020-03-06T11:33:01Z")

</div>

Hi,

Is it possible to addition different calculated amounts in a fori?

In this case, I multiply 2 numbers. All the calculated numbers need to be shown.  
At the bottom I need an addition of all the calculated numbers

Kinds regards,  
Loïc

---

<div class="post-metadata">

### Author: ![Jelena\_Sutova](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/jelena_sutova/32/599_2.png) [@Jelena\_Sutova](https://community.silverfin.com/u/Jelena_Sutova)
#### Post date: [March 6, 2020, 12:24pm UTC](https://community.silverfin.com/t/addition-in-a-fori/1697/2 "2020-03-06T12:24:46Z")

</div>

Hi Loïc

Thank you for your question.

Yes, it is possible. Here is an example of code.  
Please let me know if you need further help.

```
    {% stripnewlines %}
    {% fori item in custom.numbers %}
    
    {% if forloop.first %}
    | Header 1| Header 2| Header 3{% newline %}
    |---33%---:|---33%--:|--34%---:+{% newline %}
    {% endif %}
    
    |{% input item.number1 as:currency_dc default:0 %}
    |{% input item.number2 as:currency_dc default:0 %}
    |{%=$1+ item.number1*item.number2 %}
    {% newline %}
    
    {% if forloop.last %}
    {% comment %}Total amount{% endcomment %}
    |
    |
    |^ **{{ $1 | currency_dc }}** ^
    {% endif %}
    
    {% endfori %}
    {% endstripnewlines %}

```

Thanks.  
Jelena
