Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum difference between set of records

Hi all,

I have a set of data (which I cannot share, unfortunately) that has a list of times, grouped by a Person column (i.e. person A has times of 06.00, 06.15, 06.30 in Column A (Time1) and times of 07.00, 07.10 and 07.15 in Column B (Time1)

I want to find out the total difference in time between the minimum values for each person (of which there are about 100), so for example, for person A, the difference would be 1 hour (or 60 minutes) as the difference between 06.00 (column A) and 07.00 (the min value of Column B) is 1 hour.

The expression when just looking at one person is just min(Time2) - min(Time1), however this does not work across all records.

How can I do this as a set expression to see TOTAL time across all records?

Thanks very much for reading!

1 Reply
MK_QSL
MVP
MVP

Aggr(Interval(Min(Time2)-Min(Time1),'mm'),Person)