Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Manguirish
Contributor II
Contributor II

Cumulative Balance Calculation

 

 

I have following type of data (attached) for which i need a qlik sense script to be written or if this can be achieved in a visual or both, using set expressions etc.

 



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.

Please help.

Labels (2)
0 Replies