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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sevvalk
Creator
Creator

Hour Average

Hello, the following formula gives the difference of time and date recorded in two cases for each order. Each complaint has an entry date, which is "Date2". How can I show weekly average time differences on a chart?

interval(Timestamp#(Max({<ssldrm={'H'}>} Date1),'dd.mm.yyyy hh:mm:ss') - Timestamp#(Max({<ssldrm={'A'}>} Date1 ),'dd.mm.yyyy hh:mm:ss'),'DD hh:mm:ss') 

Labels (1)
1 Solution

Accepted Solutions
hic
Former Employee
Former Employee

I assume that you want to calculate the time difference per order, then average this over all orders in a week and display it per Week(Date2).
 
If so, you should try the following measure in a chart that uses Week(Date2) as dimension:
 
Interval(
   Avg(
      Aggr(
         Max({<ssldrm={'H'}>} Date1) - Max({<ssldrm={'A'}>} Date1 ),
         OrderID
         )
      ),
   'DD hh:mm:ss'
   ) 
 
 
 
 
 

View solution in original post

1 Reply
hic
Former Employee
Former Employee

I assume that you want to calculate the time difference per order, then average this over all orders in a week and display it per Week(Date2).
 
If so, you should try the following measure in a chart that uses Week(Date2) as dimension:
 
Interval(
   Avg(
      Aggr(
         Max({<ssldrm={'H'}>} Date1) - Max({<ssldrm={'A'}>} Date1 ),
         OrderID
         )
      ),
   'DD hh:mm:ss'
   )