Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

amount of events under variable time

Dear community,

I have a problem in my dashboard I can't work out.

I have a couple of events from which I have a beginning and an end time. End time - begin time = duration of the event. All of this I load in my load script.

Now in my dashboard I want the user to insert a value into a variable $(DurationMinutes).

Now the part I can't work out:

I want a formula with which I calculate the number of events with a duration under or equal to $(DurationMinutes).

I tried this already:

=count ({<EventDuration = {"<=time(time#($(DurationMinutes),'m'), 'hh:mm:ss')"}>} EventDuration)

But this isn't working

When i change it in this:

=count ({<EventDuration = {"<=$(time(time#($(DurationMinutes),'m'), 'hh:mm:ss'))"}>} EventDuration)

It looks like he is counting all the events without taking selections in account (so selections won't work).

Can anyone help me with this please?

Thanks in advance!!

12 Replies
Not applicable
Author

i did see your reaction after posting thisone. I reacted to your reaction with the following: This is a start! With this it gives back the amount under the DurationMinutes, But it isn't taking any selection in account

Not applicable
Author

but not when you select 3 times in Duration. Then the 4 will stay a 4 instead of adapting to the selection

Not applicable
Author

sorry This is the right answer! My apologies for that, I read it wrong.

Thanks for your help!