Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cumulative Sum in Expression

Line_IDRec_IDRec_DateQtyPull_Date
SR_1212161030-Mar-2016320019-Mar-2016
SR_1212161131-Mar-20163700(1)???
SR_1212161227-May-20163800(2)???

Help Community!

Assuming I have a record as listed in the table above and I will like to calculate the Pull_Date for the unique Line_ID taking into consideration the different Rec_Date for each Rec_ID.

For Pull_Date (1), I want to be able to loop through the records, choose the Qty (3200) for the Rec_ID (1610) and use it to get my next Pull_Date (1) for Rec_ID (1611) and also do likewise for the second Pull_Date (2) of the Rec_ID (1612) using the Qty (3700) of the Rec_ID (1611) to get the Pull_Date (2).

This is making me go crazy. I hope you guys understand what I'm trying to do. Please, ask me any question, I can definitely explain further. Thanks guys!

3 Replies
swuehl
MVP
MVP

Sorry, I don't understand what you are doing with the Qty.

I understand you just want to fill in missing Pull_Dates, but how do you find Rec_ID 1611 based on Qty 3200 / Rec_ID 1610?

If you are just looking at the previous record, look into inter record functions like Peek() or Previous().

sandipsatbhai
Creator II
Creator II

Please share the sample data and explain your problem clearly ....

Not applicable
Author

Sorry guys! I'm not sure if the topic of the questions seems right for what I am trying to achieve but I hope I get a solution somehow. Thanks for your help and concern. I am attaching this file in excel to explain what I am trying to achieve. The Pull_Date cells are the calculated fields and they are calculated based on the Qty for each previous Rec_ID. Please, check out the excel file, hopefully that will help to clarify things and what I'm trying to achieve. Thanks.

sample.JPG