Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
poluvidyasagar
Creator II
Creator II

Average of time difference between two dates of 2 differents rows

Hi All,

I am new to Qlikview.

I am trying to achieve this in Qlikview. Can any suggest me how to do it.

My Data Set:

   

PartEventTime
12345StartTime4/26/18 10:30 AM
12345EndTime4/26/18 12:30 PM
11111StartTime4/25/18 10:00 AM
11111EndTime4/25/18 11:00 AM
22222StartTime4/24/18 11:20 AM
22222EndTime4/24/18 12:20 PM

I would like to calculate the difference between start time and end time for each part and average it out. I want this happen in one expression.

In this case the result is (2 hours for first part+1 hour for second part + 1 hour for third part). so the average is 4/3

I have used Only({<Event={'EndTime'}>}Time)-Only({<Event={'StartTime'}>}Time) to get the difference. I am not sure how to calculate the average though.

Can someone help me with this?

Thanks,

10 Replies
poluvidyasagar
Creator II
Creator II
Author

I would like to know for  both cases.

How to calculate if it is 8 hours a day and  24 hours a day?