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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
flemmingbj
Contributor III
Contributor III

Group time-variable into intervals

I have a time-variable and I want to put the times into intervals. like "Below 5 minutes", "5-10 minutes", "Above 10 minutes".

How can I do that i Qlik Sense in the LOAD statement?

5 Replies
sunny_talwar
MVP
MVP

May be look here:

Buckets

OmarBenSalem
Partner - Champion II
Partner - Champion II

I would be sthing like this:

If(YourTimeField< time#(10,'mm'), dual('Under 10 min', 1),

If(YourTimeField<= time#(15,'mm'), dual('10-15 Min' ,10),

If(YourTimeField<= time#(30,'mm'), dual('15-30 Min' ,15),

If(YourTimeField<= time#(45,'mm'), dual('30-45 Min' ,30),

If(YourTimeField<= time#(60,'mm'), dual('45-60 Min'' ,45),

dual('Over 60 Min' ,60))))))

flemmingbj
Contributor III
Contributor III
Author

Both solved the problem, thanks a lot!

Not applicable

Hello,

excuse me please, one question:

How would the script have to look like if i want to make intervals every 30 Minutes? Time Format is: hh:mm:ss.

I tried:

=If([Vrijeme izd. fakture]<Time#(8:00,'hh:mm'), dual('7:00-8:00',1))

But there was an error on ' : '.. appreciate any help. thank you

brunobertels
Master
Master

Hi

below a script that's working for me to class hour by intervals of 30 min :

time(class([YourTimeDimension],'00:30'),'hh:mm') as tranche_30_test,

Regards

'00:30' to get interval of  30 min

'00:15' to get interval of 15 min etc

Regards

Bruno