Rounding When I Don't Want it

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.

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.

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

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.



Excellent topic, I thought I was going insane :slight_smile:
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.