Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

HELP! - How to add a row to get a difference between columns of data?

Katewww
6 - Meteoroid

I have got the following file, wherein if in a particular month lets say Feb if the material ID is same, in the below case 70000, then check if the vendors are different, incase, the vendor is different in the below case T and S then check the Net Price, if there is a difference between the two then take the difference of the lower amount from the higher amount in the below case 569-558, and repeat the same for order qty, subtract lower amount from higher amount and populate under Difference in Qty.

 

The total difference should be 

Total of Difference = Difference in Qty * Difference in Price .

 

Now it is not necessary that there is always a difference in the net price, mostly they are same for vendors but incase there is a difference i want to highlight those cases.

 

Also note in the below example I have given an example of only 2 vendors under the same material IDs in a particular month, there can be cases where there might be 3 or more than 3 vendors under the same material ID in such case i was to subtract max net price among the values with min net price among the values.

 

Kindly note - Cases should be found in the same month [ for example if price difference is in different months for the same material ID i don't want that] 

 

I have tried a lot to get the exact solution but I am unable to do so. Was using multi-row to create a workflow

 

ANY HELP WOULD BE APPRECIATED. 

 

Input - 

MonthMaterialMaterial Category Order Qty Supplier/Supplying PlantNet Price
February70000A           8,60010595-T558
February70000A         31,71112757-S569
February70001A           3,70010595-T658
February70001A         14,27412757-S672

 

Desired Output-

MonthMaterialMaterial Category Order Qty  Difference in Qty Supplier/Supplying PlantNet PriceDifference in PriceTotal of Difference
February70000A           8,600                            -  10595-T55800
February70000A         31,711                     23,11112757-S56911                   254,221
February70001A           3,700                            -  10595-T65800
February70001A         14,274                     10,57412757-S67214                   148,036
3 REPLIES 3
flying008
15 - Aurora

Hi, @Katewww 

 

FYI.

 

录制_2024_04_24_08_54_51_229.gif

 

Katewww
6 - Meteoroid

Thank you sooo much for the help! Can you share the workflow so I can see the multi-row formulas?

flying008
15 - Aurora

Maybe you need add group by [Month] and filter the min & max of supplier.

录制_2024_04_24_09_05_01_976.gif

Labels