Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
collegehunkschr
Contributor II
Contributor II

Grouping times by hour

Hi All,

I have a report that I am working on where I have a date column and a time column for calls that were made. What I want to do is be able to group calls in a report by groups of hours. So basically I want to be able to see how many calls took place between 8am and noon, how many between 12pm and 5pm and how many from 5pm to 9pm.

What's the best way for me to achieve this result in Qlikview? If possible I would like to be able to use these groupings as dimensions that can be selected from a list box and display them in a table as well.

Edit: the times are already in military time with no need for am/pm.

Thanks!

5 Replies
sunny_talwar

Use Hour function may be

Hour(TimeField) as Hour

collegehunkschr
Contributor II
Contributor II
Author

Thanks, but I have no idea where to even start. and not sure where to put that or how that would help me define hour groupings as dimensions that I could then display in a list box and use in tables.

sunny_talwar

Ideally, you should be creating a new field in the script, but you can also use it as a calculated dimension in a list box or a table...

collegehunkschr
Contributor II
Contributor II
Author

How would I create the new field in the script. The field that the times are in is called 'Call Time'. Times are displayed in a 24 hour format. What would I add to the script to achieve this?

sunny_talwar

Something like this...

LOAD [Call Time],

     Hour([Call Time]) as Hour,

     ...

FROM ...;