Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell474
Creator III
Creator III

Set Analysis between hours (times)

I have a requirement to calculate calls between hours.  E.g., Number of calls, per 30-minute interval, between 9:00:00 AM and 5:00:00 PM. 

I frequently do set analysis with dates, but never with times, and I can't get it to work. 

Can anyone help me understand what I'm doing wrong?

=sum({<IntvlTime = {'>= 9:00:00 AM'}>} ACDReceived)

Note: IntvlTime is in the same format as the static time in the Set Analysis,.

1 Solution

Accepted Solutions
neelamsaroha157
Specialist II
Specialist II

This is working for the sample that I picked, not sure whats the issue on your side.

Can you share sample data?

View solution in original post

5 Replies
neelamsaroha157
Specialist II
Specialist II

May be you can convert your 12 hour time field into 24 hour timestamp and then use it in the set analysis. For example  - Timestamp(Time, 'hh:mm:ss') as Time24Hours

and Set expression-

sum({<Time24Hours = {">=9:00:00"}>}ACDReceived)

neelamsaroha157
Specialist II
Specialist II

didn't add the 9-5 condition above-

sum({<Time24Hours = {">=9:00:00<=17:00:00"}>}ACDReceived)

jcampbell474
Creator III
Creator III
Author

Thank you, but it doesn't work.  The sum is zero'd out.

Here's before:

qv1.JPG

After (yours is the 3rd column)

qv2.JPG

neelamsaroha157
Specialist II
Specialist II

This is working for the sample that I picked, not sure whats the issue on your side.

Can you share sample data?

jcampbell474
Creator III
Creator III
Author

Thank you for the help!

I figured it out.  It's something you wouldn't have known without the sample data.

I had to add 'frac' to the loadscript to drop the date / extract the time. 

Timestamp(frac(intstartdte), 'hh:mm:ss') as IntvlTime

Works like a charm, now!

Thanks again!

Jason