0
votes

I'm hoping that this is a fairly simple solution, but I'm fairly new to Dynamics 365 development and the documentation and prior questions I've seen so far haven't been too helpful.

I need to create a specifically rounded calculated field within an entity. Currently the field has been set up as a decimal type and I have the precision value set to 0 to produce a whole number.

The calculation I am currently using in the field calculation editor is simply x + y / 100. However whatever result comes from that needs to be always rounded up to the next whole number rather than the nearest one. Is there a way to force the field logic to always round upwards?

If a direct answer isn't available, any resources would be appreciated.

1

1 Answers

0
votes

I would say it is working as expected since less than 0.5 will round off to lower nearest number (floor) and greater than 0.5 will round off to higher nearest number (ceiling).

To handle your scenario, to always round off to higher nearest number (ceiling) - I may recommend this: Add 49 like (x + y + 49)/100, in other words 0.49 to formula. This quirk came from top of my head but this may be the best option in calculated field perspective.

enter image description here