# Rounding When I Don't Want it

**URL:** <https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565>\
**Category:** Epicor ERP 10\
**Tags:** baq, e10, calculation, rounding\
**Created:** [December 10, 2020, 9:15pm UTC](https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565 "2020-12-10T21:15:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [December 10, 2020, 9:15pm UTC](https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565/1 "2020-12-10T21:15:07Z")

</div>

I found at least one other thread in here about this but didn’t find a good solution.  
I have a BAQ and I am doing some aggregate calculations.

I have two calculated integers being divided against one another and I want to return the decimal result. Though I have it setup as a decimal with 2 places, it rounds down to the result to nearest whole number and throws two 0s on after the decimal to mock me.

 ![image](https://www.epiusers.help/uploads/default/original/3X/1/b/1bed3d51cd4e16be3065ebcca529fcb6e0655215.png)

This has happened before and I never could figure that one out either. Is there a better way to do what I am doing? I tried making the “integers” be decimal types, added many trailing zeros, etc. No luck. I also tried someone’s round to two decimal places trick to no avail.

---

<div class="post-metadata">

**Author:** ![Hogardy](https://www.epiusers.help/user_avatar/www.epiusers.help/hogardy/32/18785_2.png) [@Hogardy](https://www.epiusers.help/u/Hogardy)\
**Post date:** [December 10, 2020, 9:39pm UTC](https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565/2 "2020-12-10T21:39:14Z")

</div>

Not sure of the source of your issue, (possible the issue might be two ints ? maybe Cast one of them as decimal ?)  
But I may suggest to you to add the rounded function in your calculated field. such as  
round(calculating expression, precision needed )

and not rely on the decimal places.

Pierre

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [December 10, 2020, 9:46pm UTC](https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565/3 "2020-12-10T21:46:29Z")

</div>

You’re the man!  
Casting the integer as a decimal with 0 trailing zeros on all my count functions and then rounding the ratios to 2 decimal places with a decimal type worked like a charm. Exactly what I was after. Thank you.

 ![image](https://www.epiusers.help/uploads/default/original/3X/c/5/c5aa9a6142235db32fb0b2129e9c43b252982069.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/3/2/32d19db9035815561cd4eb005ae9e92b53e0d615.png)  
 ![image](https://www.epiusers.help/uploads/default/original/3X/b/d/bde8e712e9694e8b66ed9e7fab6cd8a2aa85b0e4.png)

---

<div class="post-metadata">

**Author:** ![Dragos](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/59ef9b/32.png) [@Dragos](https://www.epiusers.help/u/Dragos)\
**Post date:** [December 18, 2023, 10:42am UTC](https://www.epiusers.help/t/rounding-when-i-dont-want-it/73565/4 "2023-12-18T10:42:54Z")

</div>

Excellent topic, I thought I was going insane 🙂  
I can confirm this - there’s a weird rounding to integer Epicor does. So you need to cast the count as decimal if you want to use it in another calculated field.
