Calculation ratio

Hallo,

We have manual input fiels in a document for the calculation of the ratio’s.

In the document, you can find a example of the manual input and also the code.

My question is how can I make a rollover of the manual input from one year to the another year?

Thanks,

Sylvie

Hey Sylvie

Is it necessary that the calculation of the ratio’s is made in a document?
You can probably just paste your code into a reconciliations template and use the copy details button to transfer your manual input data to the next year.

Kind regards

Sam

Hallo Sam,

I made a try with your solution and the copy details button copied the information of the column 2016 in the column 2017. This is not correct.

Thanks,

Sylvie

Morning @svalais,

Is this not the same request as this by any chance?

And if so, where are you stuck?

Hallo Sven,

This is the same thing but in a document and not in a disclosure.

See the print screens in my first question.

Thanks,

Sylvie

Hi Sylvie

We are not able to see the print screen for some reason.
Can you however post your code, so we can have a look at it?

Kind regards

Sam

Hi Sam,

In the document in annex, you will see the different print screens and the code.

Thanks,

Sylvie

Hi Sylvie

Could you please post the code in this thread itself?
Since, unfortunately, there is no way for me to see your annex.

Kind regards

Sam

Hi Sam,

This is the code:

{% hideunlessi false %}|Manual input for the calculation of the ratio
|--------------------------------------------|-----15%---------------------------------------:|-----------15%------------------------------------------{% if previous_period2.exists %}:|--------------15%-----------------------------------------{% endif %}{% if previous_period3.exists %}:|--------------15%-----------------------------------------{% endif %}{% if previous_period4.exists %}:|--------------15%-----------------------------------------{% endif %}:+
|Average number of employees (FTE) | {% $0+input custom.ratio.VTE_CY as:currency placeholder:’’ %} | {% $1+input custom.ratio.VTE_PY as:currency placeholder:’’ %} {% if previous_period2.exists %}|{% $2+input custom.ratio.VTE_PY_1 as:currency placeholder:’’ %}{% endif %} {% if previous_period3.exists %}|{% $10+input custom.ratio.VTE_PY_2 as:currency placeholder:’’ %}{% endif %} {% if previous_period4.exists %}|{% $11+input custom.ratio.VTE_PY_3 as:currency placeholder:’’ %}{% endif %}
|Number of actual achieved hours employees (= code 101 social balance sheet) | {% $3+input custom.ratio.uren_CY as:currency placeholder:’’ %} | {% $4+input custom.ratio.uren_PY as:currency placeholder:’’ %} {% if previous_period2.exists %}|{% $5+input custom.ratio.uren_PY_1 as:currency placeholder:’’ %}{% endif %} {% if previous_period3.exists %}|{% $12+input custom.ratio.uren_PY_2 as:currency placeholder:’’ %}{% endif %} {% if previous_period4.exists %}|{% $13+input custom.ratio.uren_PY_3 as:currency placeholder:’’ %} {% endif %}
|Number of actual achieved hours temp. staff (= code 151 social balance sheet) | {% $6+input custom.ratio.interim_CY as:currency placeholder:’’ %} | {% $7+input custom.ratio.interim_PY as:currency placeholder:’’ %} {% if previous_period2.exists %}|{% $8+input custom.ratio.interim_PY_1 as:currency placeholder:’’ %}{% endif %} {% if previous_period3.exists %}|{% $14+input custom.ratio.interim_PY_2 as:currency placeholder:’’ %}{% endif %} {% if previous_period4.exists %}|{% $15+input custom.ratio.interim_PY_3 as:currency placeholder:’’ %}{% endif %} {% endhideunlessi %}

Thanks,

Sylvie

Hello,

Do you have already a look on my problem?

Thanks,

Sylvie

Hello @svalais,

I think you’ll need to change your code to something like this (it’s stripped and not all your code is there, to make it more clear for you):

{% assign previous_period = period.minus_1y %}


{% stripnewlines %}
{% newline %}
  {% hideunlessi false %}
  Manual input for the calculation of the ratio
{% newline %}
{% newline %}
  |--------------------------------------------
  |-----15%------------------------------------:
  |-----------15%------------------------------:+
{% newline %}
  | Average number of employees (FTE) 
  | {% $0+input period.custom.ratio.VTE_CY as:currency placeholder:’’ %}
  | {% if previous_period.exists %}
      {% $1+input period.custom.ratio.VTE_PY as:currency default:period.minus_1y.custom.ratio.VTE_CY %} 
    {% else %}
      {% $1+input period.custom.ratio.VTE_PY as:currency placeholder:’’ %} 
    {% endif %}
  {% endhideunlessi %}
{% endstripnewlines %}

Saldo : {{ $1 | currency }}

So, your custom objects need to change to period.custom, otherwise you will not be able to get the info from the object from previous period, if it exists.

So, if the previous period exists, we’ll add a default. Which default?

This one :

period.minus_1y.custom.ratio.VTE_CY

Can you go with this @svalais ? So you’ll definitely need to change your objects and attach it to the period-drop.