# Explained/unexplained

**URL:** <https://community.silverfin.com/t/explained-unexplained/58>\
**Category:** Templates\
**Created:** [February 14, 2017, 10:58am UTC](https://community.silverfin.com/t/explained-unexplained/58 "2017-02-14T10:58:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://community.silverfin.com/u/Wim)\
**Post date:** [February 14, 2017, 10:58am UTC](https://community.silverfin.com/t/explained-unexplained/58/1 "2017-02-14T10:58:04Z")

</div>

Hi,

I’m trying to build a custom template for the calculation of intercompany intrests.  
The problem I’m facing is the indicator of the account keeps unexplained. How can i solve this?

Here is my code:

```
|Kwartaal |Saldo begin kwartaal | Saldo einde kwartaal | Gemiddelde | D/C Intrest (%) | Intrest |
|--22%-----------------------|--20%----------------------:|----20%---------------------:|-------10%-------------:|---------------------:|---------:+
|Kwartaal {% input custom.kwartaal1.naam %}|{% input custom.kwartaal1.beginsaldo as:currency %}{% $1+ custom.kwartaal1.beginsaldo %}|{% input custom.kwartaal1.eindsaldo as:currency %}{% $1+ custom.kwartaal1.eindsaldo %}|{{ $1/2 | currency }}|{% input custom.kwartaal1.intrestperc as:percentage %}{% $0+ custom.kwartaal1.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal1.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal2.naam %}|{{ $1 | currency }}|{% input custom.kwartaal2.eindsaldo as:currency %}{% $1+ custom.kwartaal2.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal2.intrestperc as:percentage %}{% $0+ custom.kwartaal2.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal2.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal3.naam %}|{{ $1 | currency }}|{% input custom.kwartaal3.eindsaldo as:currency %}{% $1+ custom.kwartaal3.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal3.intrestperc as:percentage %}{% $0+ custom.kwartaal3.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal3.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
|Kwartaal {% input custom.kwartaal4.naam %}|{{ $1 | currency }}|{% input custom.kwartaal4.eindsaldo as:currency %}{% $1+ custom.kwartaal4.eindsaldo %} |{{ $1/2 | currency }}|{% input custom.kwartaal4.intrestperc as:percentage %}{% $0+ custom.kwartaal4.intrestperc %}|{%=$2+ $1/2*$0 | currency %}{% assign $0 = 0 %}{% assign $1 = 0 %}{% $3+ $2 %}{% $2+ custom.kwartaal4.eindsaldo | currency %}{% $1+ $2 %}{% assign $2 = 0 %}
| | | **{{ $1 | currency }}** | | **Totaal intresten :** | **{{ $3 | currency }}** |

{% unexplained $3-current_account.value | as:indicator %}

*{{ current_account.link }} waarde rekening {{ current_account.value }} waarde var 3 {{ $3 | currency }} moet 0 zijn om goed te zijn ! {%=$2+$3-current_account.value %}*
```

---

<div class="post-metadata">

**Author:** ![michail](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michail/32/8_2.png) [@michail](https://community.silverfin.com/u/michail)\
**Post date:** [February 14, 2017, 2:08pm UTC](https://community.silverfin.com/t/explained-unexplained/58/2 "2017-02-14T14:08:30Z")

</div>

Hello Wim,

Can you provide me a screenshot of the output too please?

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://community.silverfin.com/u/Wim)\
**Post date:** [February 14, 2017, 2:18pm UTC](https://community.silverfin.com/t/explained-unexplained/58/3 "2017-02-14T14:18:53Z")

</div>

> [@michail](#):
>
> me a screenshot of the output too please

 ![](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/1X/7b9ecd4d86ca06ba74057a2c0e1b76357ad3a548.PNG)

---

<div class="post-metadata">

**Author:** ![michail](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michail/32/8_2.png) [@michail](https://community.silverfin.com/u/michail)\
**Post date:** [February 15, 2017, 8:25am UTC](https://community.silverfin.com/t/explained-unexplained/58/4 "2017-02-15T08:25:17Z")

</div>

Hello Wim,

Since the indicator bottom left is green, it means that your code is correct. The issue is not in code but we need to make available a new addition in the UI which will make your indicator on the top to agree with the one at the bottom. @Tim has been already informed for that and when it’s done, it will look like that:

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

---

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/tim/32/1304_2.png) [@Tim](https://community.silverfin.com/u/Tim)\
**Post date:** [February 15, 2017, 8:28am UTC](https://community.silverfin.com/t/explained-unexplained/58/5 "2017-02-15T08:28:06Z")

</div>

Hi @Wim

We’ll add this feature indeed, but in the mean time, you can pass which template should be converted in the support/chat and we’ll do it manually behind the scenes for you.

---

<div class="post-metadata">

**Author:** ![Wim](https://avatars.discourse-cdn.com/v4/letter/w/da6949/32.png) [@Wim](https://community.silverfin.com/u/Wim)\
**Post date:** [February 15, 2017, 7:15pm UTC](https://community.silverfin.com/t/explained-unexplained/58/6 "2017-02-15T19:15:37Z")

</div>

Thx! I don’t need the indicator below. Can i just delete the last 3 lines? I’ve only need the one on top for the account.

I’ve dropped the question at the helpdesk to adjust the setting for the template.

To tweak the code i think i need to add a multiplier \*1 or \*-1 for use in the 65 and 75 ranges.

My code is very simplistic any suggestions to tweak it up?

---

<div class="post-metadata">

**Author:** ![michail](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michail/32/8_2.png) [@michail](https://community.silverfin.com/u/michail)\
**Post date:** [February 15, 2017, 10:37pm UTC](https://community.silverfin.com/t/explained-unexplained/58/7 "2017-02-15T22:37:05Z")

</div>

If you want to delete the indicator, you will just have to delete `{% unexplained $3-current_account.value | as:indicator %}` . If you want to delete the next row too, then delete the last line of your code too.

---

<div class="post-metadata">

**Author:** ![Tim](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/tim/32/1304_2.png) [@Tim](https://community.silverfin.com/u/Tim)\
**Post date:** [February 15, 2017, 11:04pm UTC](https://community.silverfin.com/t/explained-unexplained/58/8 "2017-02-15T23:04:50Z")

</div>

I had a look at your code and would simplify it a bit, for example I would change the first line to

```auto
{% stripnewlines %}
  {% assign $1 = 0 %}
  | Kwartaal {% input custom.kwartaal1.naam %}
  | {% input custom.kwartaal1.beginsaldo as:currency %}
  | {% input custom.kwartaal1.eindsaldo as:currency %}
  | {% assign average = (custom.kwartaal1.beginsaldo+custom.kwartaal1.eindsaldo)/2 %} 
    {{ average | currency }}
  | {% input custom.kwartaal1.intrestperc as:percentage %}
  | {% assign intrest = average*custom.kwartaal1.intrestperc %} 
    {{ intrest | currency }}
    {% $3+ intrest %}
    {% $1+ intrest+custom.kwartaal1.eindsaldo %}
{% endstripnewlines %}

```

Mainly making things a bit more readable by using some variables simpler by using some variables. If you’d want to keep using registers, you could also do `$1+input` iso first doing the input and then adding in a register.

What I would also probably do, depending on the usecase is making the amount of quarters flexible depending on the book years. Don’t know if that’s necessary here, if it is, I can give you an idea how to approach this.

---

<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:** [April 6, 2017, 9:46am UTC](https://community.silverfin.com/t/explained-unexplained/58/9 "2017-04-06T09:46:58Z")

</div>

Closed on April 6, 2017, 9:46am UTC


