Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need to count where a field is greater than a specific time

I have data in a table field that is stored as a time value in the format h:mm:ss. I need to do a comparison and make show what percentage of the data in that column is greater than 0:01:20. The values in this field range anywhere from 0:00:01 to almost 0:20:00. I just started using Qlik Sense yesterday. I can do some basic things such as an average of ALL the data in that table but I need to be able to look at only a subset of it as well. All help appreciated. Following is what I'm trying to achieve but doesn't work: Count(Turnout > 0:01:20)

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

4 Replies
Anonymous
Not applicable
Author

See attached

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Michael gave you an answer -- for QlikView. You asked about Sense so I'll paste Michael's answer here but give Michael credit for the answer:

=count(if(Time>'1:20:00 AM' , Time))

Anonymous
Not applicable
Author

Thanks Rob, I didn't pay attention that it was Sense, and the attached file couldn't help...

Not applicable
Author

I ended up changing my time field to total seconds and then changed my LOAD statement to this:

LOAD

    Incident,

    Unit,

    "Alarm Date/Time",

    interval(Turnout/86400,'hh:mm:ss') as Turnout,

    interval(Response/86400,'hh:mm:ss') as Response,

    interval(Travel/86400,'hh:mm:ss') as Travel,

    interval(Service/86400,'hh:mm:ss') as Service

As a result, my final expression was:

1-(count({$<Turnout={">00:01:20"}>}Turnout)/count(Turnout))

I formatted my KPI field as a percentage and had exactly what I needed. Your help was greatly appreciated!