Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

collegehunkschr
New 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

Re: Grouping times by hour

Use Hour function may be

Hour(TimeField) as Hour

collegehunkschr
New Contributor II

Re: Grouping times by hour

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.

Re: Grouping times by hour

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
New Contributor II

Re: Grouping times by hour

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?

Re: Grouping times by hour

Something like this...

LOAD [Call Time],

     Hour([Call Time]) as Hour,

     ...

FROM ...;

Community Browser