Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

check the sum of quantity

Sshasnk
8 - Asteroid

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 quantityamount
123201012
123201012
125502014
125501014
456121056
486101050

 

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 quantityamountcomment
123201012 
123201012 
125502014 
125501014 
12550300added
456121056 
4561220added
486101050 

 

2 REPLIES 2
Pingu
10 - Fireball

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.

 

 

AngelosPachis
16 - Nebula

Hey @Sshasnk ,

 

Maybe something like this would work :

 

AngelosPachis_0-1620032494164.png

 

Labels