# QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
MVP

## Re: How to group mins into time interval

I believe it should still work with thousands or million of rows of data. I am not sure I understand your concern.

MVP

## Re: How to group mins into time interval

Hi,

another solution could be:

```table1:
If(time<15,Dual('<15min',14),If(time>=15 and time<120,Dual('15 - 120min',15),Dual(Replace(Class(time,120),'<= x <','-')&'min',Class(time,120)))) as [time interval];
AutoGenerate 30;
```

hope this helps

regards

Marco

Not applicable

## Re: How to group mins into time interval

I see there are 5 rows of 15 - 120 min, is there a way to group it together and replace the time column as 5 and a unique time interval as 15 - 120min?

MVP

## Re: How to group mins into time interval

You mean like

count([time interval])

?

Yes, of course.

Regards

Marco

MVP

example:

hope this helps

regards

Marco

Not applicable

## Re: How to group mins into time interval

Is there a way to open your file? I'm using personal edition

MVP

## Re: How to group mins into time interval

‌create new qvw, copy my script and paste it using the script editor.

reload, create a chart straight table using time interval as dimension and count([time interval]) as expression.

regards

Marco

Not applicable

## Re: How to group mins into time interval

How come the count all total as 30?

Highlighted
MVP

## Re: How to group mins into time interval

it's the sum

2+6+5+11+5+1 = 30

hope this helps

regards

Marco

Not applicable

## Re: How to group mins into time interval

I was trying to achieve the above, as you notice the 2 boxes on the right all total 1000 (in your eg should be 30) and the time interval 15 - 120min is both 107?