Hello Peers,
How do I distribute the remainder among top rows in order after I perform division as long as the remainder becomes 0 through a workflow? Please note that I do not want the final sum to be a Double datatype rather Integer datatype. Here's an example:
| Name | Count_Name | MID | Sum | Remainder | WID |
| G1 | 5 | 1 | 5 | 3 | 1 |
| G1 | 5 | 1 | 5 | 3 | 2 |
| G1 | 5 | 1 | 5 | 3 | 3 |
| G1 | 5 | 1 | 5 | 3 | 4 |
| G1 | 5 | 1 | 5 | 3 | 5 |
| G2 | 4 | 2 | 10 | 3 | 1 |
| G2 | 4 | 2 | 10 | 3 | 2 |
| G2 | 4 | 2 | 10 | 3 | 3 |
| G2 | 4 | 2 | 10 | 3 | 4 |
So, if this above shown table is source data, I would want the final sum to be as shown below:
Final Sum = Reminder to be distributed across WIDs in an order as integer values as long as remainder becomes 0.
| Name | Count_Name | MID | Sum | Remainder | WID | Final Sum |
| G1 | 5 | 1 | 5 | 3 | 1 | 6 |
| G1 | 5 | 1 | 5 | 3 | 2 | 6 |
| G1 | 5 | 1 | 5 | 3 | 3 | 6 |
| G1 | 5 | 1 | 5 | 3 | 4 | 5 |
| G1 | 5 | 1 | 5 | 3 | 5 | 5 |
| G2 | 4 | 2 | 10 | 3 | 1 | 11 |
| G2 | 4 | 2 | 10 | 3 | 2 | 11 |
| G2 | 4 | 2 | 10 | 3 | 3 | 11 |
| G2 | 4 | 2 | 10 | 3 | 4 | 10 |
Thanks!