Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Partner
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

1 Solution

Accepted Solutions
Highlighted

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'))

QlikCommunity_Thread_148863_Pic1_.JPG

hope this helps

regards

Marco

6 Replies
Highlighted

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'))

QlikCommunity_Thread_148863_Pic1_.JPG

hope this helps

regards

Marco

Re: Class using real time - progtime

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

regards

Marco

whiteline
Honored Contributor II

Re: Class using real time - progtime

Hi.

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

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

Re: Class using real time - progtime

Hi,

glad that it works.

For unequal sized buckets maybe this thread can help:

Custom Filter(unusual range)

Regards

Marco