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: 
johnan
Creator III
Creator III

Get counts in time

Hi ,how can i get the sum of counts if a time is more than 20 minutes beetwen the post?
Example:

10:10
10:04
10:10
10:31
10:40
11:01
Here is 2 post that is 20 minutes or more

8 Replies
Saravanan_Desingh

Try this.

=Count(Aggr(If(Interval(Time-Above(Time),'mm')>=Time#(20,'mm'),Time),Time))
johnan
Creator III
Creator III
Author

Hi, thanx 🙂

 

Got this result: It seems not to be right?

johnan_0-1594919652147.png

 

Kushal_Chawda

try below. if not post us the expected output

=Count(Aggr(If(Interval(Time-Above(total Time),'mm')>=Time#(20,'mm'),Time,anv.flytt),Time))

Saravanan_Desingh

@johnan  My expression should be used in a Text box. Not in a Chart.

Please try it in a Text box and let me know.

johnan
Creator III
Creator III
Author

Aha, is it possible to get it a chart?

Saravanan_Desingh

You can try the expression like.

If(Time-Above(Time)>=Time#(20,'mm'),1)

Dimension is: Time

commQV47.PNG

Saravanan_Desingh

Output.

commQV48.PNG

johnan
Creator III
Creator III
Author

Hi ,here is my result

johnan_0-1594967315908.png

The Start and Stopp is based on Min and Max (Tid) per User and the tot tid is bases on  (Interval(Stopp-Start,'hh:mm'))

johnan_1-1594967385700.png

If i just do a simpled table based on user P452 i got this and it's correct:

johnan_2-1594967498367.png

And the expresssion is:

So i want this to shown in my first table above 🙂

if([Anv. flyttar gods]='P452', If(Tid-Above(Tid)>=Time#(20,'mm'),1))