# Sum of the row counts

**URL:** <https://community.silverfin.com/t/sum-of-the-row-counts/256>\
**Category:** Templates\
**Tags:** tables, input, tables\_markdown\
**Created:** [May 15, 2017, 12:27pm UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256 "2017-05-15T12:27:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [May 15, 2017, 12:27pm UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256/1 "2017-05-15T12:27:10Z")

</div>

We have this code:

```auto

_ **DETAIL FINANCIERING** _

|-----------18%---------------|---------------22%-----------:|---------------25%-----------:+
| Doel |{% input custom.lening.doel%}||

<br>

|-----------20%---------------|---------------20%-----------:|---------------25%-----------:+
| Kapitaal |{% $1+input custom.lening.kapitaal as:currency%}||
| Intresten |_{% $2+input custom.lening.intresten as:currency%}_||
| TOTAAL |{{ $1+$2 | currency }}||

<br>

|-----------20%---------------|---------------20%-----------:|---------------25%-----------:+
| Zijnde: | {% input custom.lening.aantalmaalbedrag %} ||
| Eerste vervaldag: |{% input custom.lening.vervaldag as:date%}||

<br>

|-----------25%---------------|---------------25%-----------:|---------------25%-----------:|---------------25%-----------:+
||_Kapitaal_|_Intresten_|_TOTAAL_

|-----------25%---------------|---------------25%-----------:|---------------25%-----------:|---------------25%-----------:+{% fori aflossingstabel in custom.leningen %}
|{% input aflossingstabel.jaarenaantalmaanden %}|{% if forloop.last %}_{% endif %}{% $10+input aflossingstabel.kapitaal as:currency %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% $20+input aflossingstabel.intresten as:currency %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{{ $10+$20 | currency }}{% if forloop.last %}_{% endif %}{% endfori %}
| | **{{ $10 | currency }}** | **{{ $20 | currency }}** | **{{ $10+$20 | currency }}**

```

We get this result:

 ![](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/43de265cd9bd682ed19379155cb315133e2ce839.png)

Is it possible to list the total of only one row instead of the sum of all previous rows in the last column?

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [June 1, 2017, 11:33am UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256/2 "2017-06-01T11:33:10Z")

</div>

Little reminder 😊

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [June 2, 2017, 8:57am UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256/3 "2017-06-02T08:57:46Z")

</div>

Hi @Fiduciaire.Eulaers,

What exactly do you need? Depending on the date you’re in, it show the total of that row?

Or do you mean it like that :

```auto
_ **DETAIL FINANCIERING** _

|-----------18%---------------|---------------22%-----------:|---------------25%-----------:+
| Doel |{% input custom.lening.doel%}||

<br>

|-----------20%---------------|---------------20%-----------:|---------------25%-----------:+
| Kapitaal |{% $1+input custom.lening.kapitaal as:currency%}||
| Intresten |_{% $2+input custom.lening.intresten as:currency%}_||
| TOTAAL |{{ $1+$2 | currency }}||

<br>

|-----------20%---------------|---------------20%-----------:|---------------25%-----------:+
| Zijnde: | {% input custom.lening.aantalmaalbedrag %} ||
| Eerste vervaldag: |{% input custom.lening.vervaldag as:date%}||

<br>

|-----------25%---------------|---------------25%-----------:|---------------25%-----------:|---------------25%-----------:+
||_Kapitaal_|_Intresten_|_TOTAAL_

|-----------25%---------------|---------------25%-----------:|---------------25%-----------:|---------------25%-----------:+{% fori aflossingstabel in custom.leningen %}
|{% input aflossingstabel.jaarenaantalmaanden %}|{% if forloop.last %}_{% endif %}{% $10+input aflossingstabel.kapitaal as:currency %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{% $20+input aflossingstabel.intresten as:currency %}{% if forloop.last %}_{% endif %}|{% if forloop.last %}_{% endif %}{{ aflossingstabel.kapitaal+aflossingstabel.intresten | currency }}{% if forloop.last %}_{% endif %}{% endfori %}
| | **{{ $10 | currency }}** | **{{ $20 | currency }}** | **{{ $10+$20 | currency }}**

```

See what I did there?

By doing `{% $10+input aflossingstabel.kapitaal as:currency %}` the $10 will add the amount for every loop. The third column we don’t use those $10 and $ 20, but just the variables : `aflossingstabel.kapitaal+aflossingstabel.intresten | currency`

And in the last loop you’ll just show the total of $10 and $20.

Hope this is understandable; sorry we forgot about this post.

---

<div class="post-metadata">

**Author:** ![Fiduciaire.Eulaers](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/fiduciaire.eulaers/32/31_2.png) [@Fiduciaire.Eulaers](https://community.silverfin.com/u/Fiduciaire.Eulaers)\
**Post date:** [June 2, 2017, 10:17am UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256/4 "2017-06-02T10:17:43Z")

</div>

It’s working! Thanks! 🎉

---

<div class="post-metadata">

**Author:** ![sven](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/sven/32/1495_2.png) [@sven](https://community.silverfin.com/u/sven)\
**Post date:** [June 2, 2017, 11:04am UTC](https://community.silverfin.com/t/sum-of-the-row-counts/256/5 "2017-06-02T11:04:07Z")

</div>


