# Distribute total: how to manage rounding rest

**URL:** <https://community.easymorph.com/t/distribute-total-how-to-manage-rounding-rest/2429>\
**Category:** General Q&A\
**Created:** [February 2, 2021, 11:35am UTC](https://community.easymorph.com/t/distribute-total-how-to-manage-rounding-rest/2429 "2021-02-02T11:35:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreaM](https://community.easymorph.com/user_avatar/community.easymorph.com/andream/32/771_2.png) [@AndreaM](https://community.easymorph.com/u/AndreaM)\
**Post date:** [February 2, 2021, 11:35am UTC](https://community.easymorph.com/t/distribute-total-how-to-manage-rounding-rest/2429/1 "2021-02-02T11:35:57Z")

</div>

Hello everyone,

I've to distribute the net weight of a box on the items quantity inserted in the box, for example:

Box net: 10Kg

Item A: 3pcs  
Item B: 3pcs  
Item C: 3pcs

If I use "Distribute total" and then round to 2nd decimal, the result will be:  
Item A: 3,33Kg  
Item B: 3,33Kg  
Item C: 3,33Kg

The problem is that the SUM of the items net is 9.99Kg, not 10Kg.  
Usually, in case similar to this, I put the difference between calculated and original in the last item:  
Item A: 3,33Kg  
Item B: 3,33Kg  
Item C: 3,3 **4** Kg

How I can manage this?

---

<div class="post-metadata">

**Author:** ![AndreaM](https://community.easymorph.com/user_avatar/community.easymorph.com/andream/32/771_2.png) [@AndreaM](https://community.easymorph.com/u/AndreaM)\
**Post date:** [February 2, 2021, 12:59pm UTC](https://community.easymorph.com/t/distribute-total-how-to-manage-rounding-rest/2429/2 "2021-02-02T12:59:13Z")

</div>

ATM the solution is:  
1\> Enumerate rows;  
Item A: 3pcs 3,33 **1**  
Item B: 3pcs 3,33 **2**  
Item C: 3pcs 3,33 **3**

- Subtotal the Max row number;  
Item A: 3pcs 3,33 1 **3**  
Item B: 3pcs 3,33 2 **3**  
Item C: 3pcs 3,33 3 **3**

- Rule if current num row = max num row, add the delta;  
Item A: 3pcs 3,33 1 3  
Item B: 3pcs 3,33 2 3  
Item C: 3pcs 3,3 **4** 3 3

It works, but maybe there's a better way to achieve this.

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [February 2, 2021, 3:39pm UTC](https://community.easymorph.com/t/distribute-total-how-to-manage-rounding-rest/2429/3 "2021-02-02T15:39:27Z")

</div>

This method seems fine to me. Identifying the last row is easy in EasyMorph. Running total is easy too.
