Skip to main content
Announcements
See why Qlik was named a Leader in the 2025 Gartner® Magic Quadrant™ for Augmented Data Quality Solutions: GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
npadilla73
Contributor III

Get a selection according to the dates of production shift.

Hi, I need your help!

I have a list box with the dates of production that took place during the day , but I want that them be selected according to the production shift:

example :

Production shift "A" comes from 6:00 am to 6:00 pm,

Production shift "B" goes from 6:00 pm to 6:00 am,

So, if I selected production shift "A" , I require that QV selects everything that corresponds to the shift schedule from "DATE_PRODUCTION" field, and if I selected production shift "B", I need that QV selects from "DATE_PRODUCTION" field what occurred at that time.

I appreciate your help, Thank you.

Noé Padilla

1 Solution

Accepted Solutions
ramoncova06
Partner - Specialist III

que cambio estas haciendo ?

en lugar de usar subfield usa left(campo,15)

aunque siendo sinceros no entiendo para que necesitas los minutos, a menos que tengas que agregar esa información como dato

View solution in original post

11 Replies
ramoncova06
Partner - Specialist III

best option is to create a flag for each shift inside of your script

npadilla73
Contributor III
Author

Hi Ramon,

Thanks, but I am new in Qlik view, can you show me an example?

ramoncova06
Partner - Specialist III

this is pretty raw, but it should give you an idea of what I mean

npadilla73
Contributor III
Author

Great the Idea, but is little different, I attach two files, I hope you understand me, is the same idea that you send me, but change it, because I want to know the production shift with respect two dates.

ramoncova06
Partner - Specialist III

ok, entonces el problema es que tu archivo fuente los tiene con el minuto, alguna vez termina tu turno a la media hora ? so siempre a la hora ?

npadilla73
Contributor III
Author

Gracias Ramón,

El turno siempre es de 12 horas y cambia cada 4 días porque entra el otro turno, pero la producción la entregan durante el tiempo del turno, como lo muestro en el archivo "ShiftProduction".

Pero mi idea original es saber, conforme a la hora de entrega o terminación de la producción (que pueden ser varias entregas durante el turno), a que turno pertenece, ya que se debe considerar entre dos fechas.

El calendario de turnos esta definido por año, solo visualice 10 días para un ejemplo rápido.

Muchas gracias por tu pronto respuesta

ramoncova06
Partner - Specialist III

para eso puedes usar intervalmatch

IntervalMatch

npadilla73
Contributor III
Author

Muchas gracias Ramón,

Es exactamente lo que necesito.

npadilla73
Contributor III
Author

Hola Ramón, nuevamente,

Esta genial la solución, pero solo me considera hasta horas, y no los minutos.   Hago el cambio en la sentencia de la tabla Prod, pero al ejecutarlo ya no aparece nada.