Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Rank and check a field and get sum

Need to calculate time based on ranking and confirmation time. For Rank 5 the confirmation time of rank 6 is equal then we need to minus Confirmation time first step. i.e. 14.08.53 - 13.47.35 = 21 else confirmation time - Confirmation time first step

   

TO Nr.TO itemMaterialConfirmation date first stepConfirmation time first stepRankConfirmation dateConfirmation timePicking time
1552141422203700110 22-2-201813:19:00122-2-201813:19:390:00:39
1552142423509910411 22-2-201813:20:53222-2-201814:09:050:48:12
1552143422200253991 22-2-201813:40:28322-2-201813:40:280:00:00
1552144422200253991 22-2-201813:42:47422-2-201814:09:050:04:38
1552145422203426171 22-2-201813:47:25522-2-201814:09:050:21:28
1552146422203534323 22-2-201814:08:53622-2-201814:09:050:00:12
1552147422203700110 22-2-201814:09:57722-2-201814:10:580:01:01
1552148422200253991 22-2-201814:10:45822-2-201814:10:450:00:00
21 Replies
Anonymous
Not applicable
Author

I am getting below error in date field

sunny_talwar

Sorry, what is the error?

Anonymous
Not applicable
Author

for function RangeSum([Confirmation date first step], [Confirmation time first step]) as [Confirmation datetime first step],. date field is getting wrong.

Anonymous
Not applicable
Author

Records are getting duplicated if I have new TO Nr

   

TO Nr.TO itemMaterialConfirmation date first stepConfirmation time first stepRankConfirmation dateConfirmation time
1552141422203700110 22-2-201813:19:00122-2-201813:19:39
1552142423509910411 22-2-201813:20:53222-2-201814:09:05
1552143422200253991 22-2-201813:40:28322-2-201813:40:28
1552144422200253991 22-2-201813:42:47422-2-201814:09:05
1552145422203426171 22-2-201813:47:25522-2-201814:09:05
1552146422203534323 22-2-201814:08:53622-2-201814:09:05
1552147422203700110 22-2-201814:09:57722-2-201814:10:58
1552148422200253991 22-2-201814:10:45822-2-201814:10:45
1552151422199215809 22-2-201814:08:53122-2-201814:09:05
1552152422197575643 22-2-201814:09:57222-2-201814:10:58
1552153422195935477 22-2-201814:10:45322-2-201814:10:45
1552154422194295311 22-2-201814:08:53422-2-201814:09:05
Anonymous
Not applicable
Author

TO Nr gets duplicated with script. Please can you help

sunny_talwar

Can you pinpoint where do you see the duplication?

Anonymous
Not applicable
Author

Sorry it was my mistake.. not duplicate.. But first record i.e. 4.4:36 - 3.56:49 = 7 because confirmation date is same

 

  • If for a TO item its rank X has the same confirmation date and time as transfer order item X+1 then the picking time = Confirmation date and time of (X+1) first step -  confirmation date of X first step

 

sunny_talwar

Can you attach the file you are looking at? It might be easy to find the error if I have the code in front of me for the data you have used

Anonymous
Not applicable
Author

If any of the date and time field is null then picking time shud be blank...