# Rounded numbers and calculating with the full number

**URL:** <https://community.silverfin.com/t/rounded-numbers-and-calculating-with-the-full-number/966>\
**Category:** Templates\
**Tags:** variables, attribute\_currency, attribute\_percentage\
**Created:** [June 6, 2018, 9:46am UTC](https://community.silverfin.com/t/rounded-numbers-and-calculating-with-the-full-number/966 "2018-06-06T09:46:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![StagiairAMG](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@StagiairAMG](https://community.silverfin.com/u/StagiairAMG)\
**Post date:** [June 6, 2018, 9:46am UTC](https://community.silverfin.com/t/rounded-numbers-and-calculating-with-the-full-number/966/1 "2018-06-06T09:46:47Z")

</div>

Hello

I have the following problem: I have made a template with following code

```auto
{% t 'Actualisatievoet' %} | {% input custom.detail.actualisatievoet as:currency %} {% assign $6 = custom.detail.actualisatievoet %}
{% t 'Dossierkosten' %} | {% input custom.detail.dossierkosten as:currency %} {% assign $5 = custom.detail.dossierkosten %}

```

the problem is that the numbers you have to put in have more than 2 digits after the comma but it automaticaly rounds the number. Is there a possibility to work with the whole number? This can bring a big difference when we calculate with these.

Kind regards  
StagiairAMG

---

<div class="post-metadata">

**Author:** ![robindeclercq](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/robindeclercq/32/472_2.png) [@robindeclercq](https://community.silverfin.com/u/robindeclercq)\
**Post date:** [June 6, 2018, 1:56pm UTC](https://community.silverfin.com/t/rounded-numbers-and-calculating-with-the-full-number/966/2 "2018-06-06T13:56:22Z")

</div>

Hello @StagiairAMG,

Indeed, you cannot put in or work with more than 2 digits after the comma when you input the value as currency or as percentage.

In order to overcome this problem you should drop the ‘as:currency’ in your input field. Next to that, the value that is filled in should contain a point (‘.’) instead of a comma (‘,’) to seperate the decimal numbers. To make sure the correct value is used to calculate, you can add replace:“,”,“.” to your code. Finally, ‘plus: 0’ is added to make sure the value is considered as an integer.

> {% t ‘Actualisatievoet’ %} | {% input custom.detail.actualisatievoet %} {% assign acutalisatievoet = custom.detail.actualisatievoet | replace:“,”,“.” | plus: 0 %}{% assign $6 = acutalisatievoet %}  
> {% t ‘Dossierkosten’ %} | {% input custom.detail.dossierkosten %} % assign dossierkosten = custom.detail.actualisatievoet | replace:“,”,“.” | plus: 0 %}{% assign $5 = dossierkosten %}

Hope this helps!

Kind regards,  
Robin
