Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Manguirish
Contributor II
Contributor II

Carrying forward row value to calculate next row (by Date,SKU)

I have following type of data (attached) for which i need a Qlik script Whether a Qlik script or a visual or a combination of both, any solution is okay.

Data for the same has been attached in the file Sample Problem Data. Below are the conditions for the code

Sample DataSample Data

For Day 1 (First Date) for a particular SKU: Physical Qty + Expected Qty - Forecast = Balance

For Day 2 and Onwards, for that particular SKU: Physical Qty + Expected Qty + (Previous Date's Balance) - Forecast = Balance

This means the balance quantity of the previous date for that SKU is carried over to the next date to calculate that day's balance.

The Qlik script i wrote gives me correct output till day 2. That is because the balance of Day 1 is not dependent on previous day's balance. The calculations fail thereafter for day 3 and onwards.

Please help.

Thanks

Labels (2)
0 Replies