Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
fkeuroglian
Partner - Master
Partner - Master

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
MarcoWedel

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

View solution in original post

6 Replies
MarcoWedel

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

MarcoWedel

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

regards

Marco

whiteline
Master II
Master II

Hi.

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

MarcoWedel

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

fkeuroglian
Partner - Master
Partner - Master
Author

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

MarcoWedel

Hi,

glad that it works.

For unequal sized buckets maybe this thread can help:

Custom Filter(unusual range)

Regards

Marco