Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
jsk_sathis
Partner - Contributor II
Partner - Contributor II

Accumulate calculation in load script

HI

 

I'm looking to create a script that will run through data on a table that will allocate incoming stock of a part to customers Back order and give a stock balance before moving on to the next row.

please see the below table where I have the customer orders and the purchases that we ordered to supplier.

I need to check the ordered parts then check the incoming orders then allocate the quantity based on FIFO then put the ETA date accordingly.

 

Orders from customer
PartNOOrdered QtyCustomer Order NumberOrder Date
ABC151101-02-2019
ABC1202125-02-2019
ABC2102125-02-2019
ABC1123027-02-2019

 

Orders from TIQ To Supplier
Part NumberPurchased QTYTIQ Order NumberETA Date
ABC12115-02-2019
ABC115230-02-2019
ABC220230-02-2019
ABC150704-04-2019

 

Expected Result:

 

Resulting Table
PartNOCustomer Order NoCustomer Order dateSupply QtyTIQ Order NumberETA
ABC11101-02-20192115-02-2019
ABC11101-02-20193215-02-2019
ABC12125-02-201912230/02/2019
ABC12125-02-20198704-04-2019
ABC22125-02-201910230/02/2019

 

Kindly advice on the method to achieve it.

 

Labels (1)
0 Replies