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: 
Jogi
Contributor III
Contributor III

Calculate the sum with condition

Hi, i want to calculate

Sum of time for all operations that went ok first time it run

Operation   Status       Date                  Time 

1                     OK              11/12/2019     23 

1                     OK              11/12/2019     34

2                     OK             11/13/2019      2324

3                    NOK           11/14/2019      234

 

 

Should be for operation 1 =  23 

 

2 Replies
Anil_Babu_Samineni

Why not 34 since there is no restrict on first 3 fields not the time?  What is the output for below?

Operation   Status       Date                  Time 

1                     OK              11/12/2019     34 

1                     OK              11/12/2019     23

2                     OK             11/13/2019      2324

3                    NOK           11/14/2019      234

Note: If you are looking row wise data of First one please clarify us?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Jogi
Contributor III
Contributor III
Author

Hi, sorry  poor explanation 

1                     OK              11/12/2019     34 

1                     OK              10/12/2019     23

2                     OK             11/13/2019      2324

3                    NOK           11/14/2019      234

 

should be first OK for Number 1 + number 2 OK   = 23+ 2324 

So i need to select only min(Ok) for each ID and make the sum

Does it help please let me know /