# New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Partner

## Class using real time - progtime

hi expert

i want to know if i can create an interval using a calculate dimension

attached a qvw and a qvd to give a example and an image to show the final result that i pretend

in the interval i want the amount of fly that have a delay between 0 and 15 minute, 15 minute and 30 and etc?

i am try to create an interval using a calculate dimension with class but have error

thank you a lot

Fernando

Tags (6)
1 Solution

Accepted Solutions
MVP

## Re: Class using real time - progtime

Hi Fernando,

one solution could be:

=Dual(Interval(SubField(Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'),'<= x <',1),'hh:mm')&' - '&Interval(SubField(Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'),'<= x <',2),'hh:mm'),Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'))

hope this helps

regards

Marco

6 Replies
MVP

## Re: Class using real time - progtime

Hi Fernando,

one solution could be:

=Dual(Interval(SubField(Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'),'<= x <',1),'hh:mm')&' - '&Interval(SubField(Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'),'<= x <',2),'hh:mm'),Class(Fecha_Real_TIME-Fecha_Prog_TIME, '00:15'))

hope this helps

regards

Marco

MVP

## Re: Class using real time - progtime

You could improve the performance by precalculating the buckets in the load script.

regards

Marco

Honored Contributor II

## Re: Class using real time - progtime

Hi.

I think the string parsing functions here is a bit over complication.

MVP

## Re: Class using real time - progtime

Hi,

I tried to create interval classes with underlying numerical values to still be sortable numerically.

I would love to learn another/shorter solution though.

thanks

regards

Marco

Partner

## Re: Class using real time - progtime

Marco, thank you a lot!! work great!

another question, if i want to know the number of fly that have between 1 and 15 minutes of difference, and the number of fly that have between 15 and 30 minutes and the same to the have 30 to 60 minutes of difference?

what is the best way or what could be?

thank you a lot!

Fernando

MVP

Hi,