Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
leobhavin
Contributor II
Contributor II

Count Time Instances

I am trying to count the number of instances where the time stamp minutes = 00, 15, 30, or 45. For example:

Time Stamp = DD/MM/YYYY hh:mm:ss

02/01/2016 09:45:00

03/01/2016 04:32:00

04/01/2016 10:15:00

05/01/2016

and so on....

For the above the count is 2. I am using Qlik Sense 3.1

My date and time are together. Note there are some instances where there is no timestamp but only date like in the example above.

Please could someone assist.

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Separate out the minute factor during load to simplify the expression

timestmp:

Load timestamp#(TmStmp,'DD/MM/YYYY hh:mm:ss') as TmStmp,Minute(timestamp#(TmStmp,'DD/MM/YYYY hh:mm:ss')) as MinuteIS inline [

TmStmp

02/01/2016 09:45:00

03/01/2016 04:32:00

04/01/2016 10:15:00

];

in chart use expression like

=count({<MinuteIS={'15','30','45'}>}MinuteIS)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

1 Reply
vinieme12
Champion III
Champion III

Separate out the minute factor during load to simplify the expression

timestmp:

Load timestamp#(TmStmp,'DD/MM/YYYY hh:mm:ss') as TmStmp,Minute(timestamp#(TmStmp,'DD/MM/YYYY hh:mm:ss')) as MinuteIS inline [

TmStmp

02/01/2016 09:45:00

03/01/2016 04:32:00

04/01/2016 10:15:00

];

in chart use expression like

=count({<MinuteIS={'15','30','45'}>}MinuteIS)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.