Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Eaun
Contributor III
Contributor III

Rolling Qty

How can I reproduce the formula in column J in this excel sheet to do a rolling Qty on the on hand qty in qlik sense on a pivot table ?


I've had no luck so far : (

1 Reply
Eaun
Contributor III
Contributor III
Author

Tried this :

Test:
LOAD
Rowno() as RowNumber,
PROCESS_CODE,
LINE_CODE,
PART_NUMBER,
CUSTOMER_P_O_NUMBER,
SHIPPING_DATE,
"ORDER QTY",
"SHIPPED QTY",
"REMAINING QTY TO SHIP",
"ON HAND QTY" as [On Hand Rolling Qty],
"ON HAND QTY"
FROM [lib://Qlik Test/Other source files/Rolling Qty.xlsx]
(ooxml, embedded labels, table is Rad2);

Left Join (Test)
Load Distinct
RowNumber,
if( alt(previous([On Hand Rolling Qty]),0)>=0,
alt(previous([On Hand Rolling Qty])-[REMAINING QTY TO SHIP],
alt(previous([On Hand Rolling Qty])-[SHIPPED QTY] ))) as [Rolling Qty]

Resident Test;

but the last row does not down date : ( 

Any ideas how I can get around this ?