Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
minvestis
Contributor II
Contributor II

Qlik script - Using subtraction with a running total

Load * Inline [
Month,Budget,Forecast,Actual,Backlog
Jan-2020,17697527,239570,14507823,0
Feb-2020,17733064,408462,14947235,2785829
Mar-2020,4223912,322025,0,2463804
Apr-2020,3223889,490681,0,1973123
];

 

And I'm try to calculate the Backlog Remaining.

Jan-2020

Output = 0, it should calculate from current month

Feb-2020

Output = 2785829, If current month then Budget - Actual

Mar-2020

Output = 2463804, Output of Feb-2020 - Forecast (i.e. 2785829 - 322025 = 2463804)

Apr-2020

Output = 1973123, Output of Mar-2020 - Forecast (i.e. 2463804 - 490681 = 1973123)

 

Can anyone help me to achieve this output?

Let me know if any more information required for the same.

 

Thanks

Mayank Patel

Labels (3)
1 Reply
killersswang
Contributor II
Contributor II

the "peek" function with "if" condition should be used.