I have a dataset where I have two columns and I have to check if the sum of the breakdown quantity is equal to the quantity
Product Id | quantity | break down quantity | amount |
123 | 20 | 10 | 12 |
123 | 20 | 10 | 12 |
125 | 50 | 20 | 14 |
125 | 50 | 10 | 14 |
456 | 12 | 10 | 56 |
486 | 10 | 10 | 50 |
Steps:
1. Check if quantity is equal to the sum of the breakdown quantity
2. If both are equal then we don't have to do anything if quantity is not equal to breakdown quantity then we have to create a row below and do Quantity - Sum breakdown quantity. and the amount should be equal to zero
Example: Prod Id 125: Quantity is 50 - (20+10) = 20. Please only take one value from the quantity
3. For all the row which is added we have to add a comment as added like below
Output:
Product Id | quantity | break down quantity | amount | comment |
123 | 20 | 10 | 12 | |
123 | 20 | 10 | 12 | |
125 | 50 | 20 | 14 | |
125 | 50 | 10 | 14 | |
125 | 50 | 30 | 0 | added |
456 | 12 | 10 | 56 | |
456 | 12 | 2 | 0 | added |
486 | 10 | 10 | 50 |
Hello Sshasnk,
This should be possible with the Summary and Filter tools.
I have added a draft workflow using your explained logic.
(In the Formula tool I should have renamed step 1 just into break down quantity, but it will not affect runtime)
Let me know what you think.
Also the left over quantity for product 15 is 20 then I think in your example.