Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Repeat column data (Repetir datos de columnas)

Hello I could support with a problem that I have please

I have 2 tables, one containing all the information of personnel changes, the other has the daily ticket assistance.

Movements example:

StaffMotionDateFinal datePost
1I change position01/05/201405/03/2014seller
1I change position05/04/201431/12/9999supervisor

Example Assistance

StaffDateTime Entry
101/05/20148:05
102/05/20148:00
105/03/20148:01
105/04/20147:58
105/05/20148:15
105/06/20148:00

Need to unite, join me in making the delivery the following table

StaffDateTime EntryFinal dateMotionPost
101/05/20148:0505/03/2014Position changeSeller
102/05/20148:00---
105/03/20148:01---
105/04/20147:5831/12/9999Position changeSupervisor
105/05/20148:15---
105/06/20148:00---

But to know that since I was in any day I require the table like this:

StaffDateTime EntryFinal dateMotionPost
101/05/20148:0505/03/2014Position changeSeller
102/05/20148:00--Seller
105/03/20148:01--Seller
105/04/20147:5831/12/9999Position changeSupervisor
105/05/20148:15--Supervisor
105/06/20148:00--Supervisor

Can you help me get to the latter table please, since in both tables there are several fields that I require to be repeated from the transformer as the amount of records I is not feasible for the application to perform the calculation.

Thank you

Translated with Google Translate - Qlik Community Administrative Team

Hola me podrían apoyar con un problema que tengo por favor

Tengo 2 tablas, una contiene toda la información de cambios del personal, la otra tiene las entradas diarias de asistencia.

Ejemplo Movimientos:

PersonalMovimientoFechaFecha FinalPuesto
1cambio puesto01/05/201403/05/2014vendedor
1cambio puesto04/05/201431/12/9999supervisor

Ejemplo Asistencia

PersonalFechaHora Entrada
101/05/201408:05
102/05/201408:00
103/05/201408:01
104/05/201407:58
105/05/201408:15
106/05/201408:00

Necesito unirlas, al hacer el join me entrega la siguiente tabla

PersonalFechaHora EntradaFecha FinalMovimientoPuesto
101/05/201408:0503/05/2014Cambio PuestoVendedor
102/05/201408:00---
103/05/201408:01---
104/05/201407:5831/12/9999Cambio PuestoSupervisor
105/05/201408:15---
106/05/201408:00---

Pero para poder yo saber que puesto era en cualquier día yo requiero la tabla de esta manera:

PersonalFechaHora EntradaFecha FinalMovimientoPuesto
101/05/201408:0503/05/2014Cambio PuestoVendedor
102/05/201408:00--Vendedor
103/05/201408:01--Vendedor
104/05/201407:5831/12/9999Cambio PuestoSupervisor
105/05/201408:15--Supervisor
106/05/201408:00--Supervisor

Me podrían ayudar a llegar a esta ultima tabla por favor, ya que en ambas tablas hay varios campos que requiero que se repitan desde el Transformador puesto que por la cantidad de registros no me es factible que la Aplicación realice el calculo.

Gracias

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

T1:

LOAD * INLINE [

    Personal, Movimiento, Fecha, Fecha Final, Puesto

    1, cambio puesto, 01/05/2014, 03/05/2014, vendedor

    1, cambio puesto, 04/05/2014, 31/12/9999, supervisor

];

Right Join(T1)

LOAD * INLINE [

    Personal, Fecha, Hora Entrada

    1, 01/05/2014, 08:05

    1, 02/05/2014, 08:00

    1, 03/05/2014, 08:01

    1, 04/05/2014, 07:58

    1, 05/05/2014, 08:15

    1, 06/05/2014, 08:00

];

NoConcatenate

T2:

Load Personal,

  Fecha,

  [Hora Entrada],

  [Fecha Final],

  Movimiento,

  if(Len(Puesto)=0,Peek(Puesto1),Puesto) as Puesto1

Resident T1 Order by Personal,Fecha;

DROP Table T1;

Hi,

View solution in original post

3 Replies
maxgro
MVP
MVP

try the attachment (I added another Staff and changed some date)

settu_periasamy
Master III
Master III

T1:

LOAD * INLINE [

    Personal, Movimiento, Fecha, Fecha Final, Puesto

    1, cambio puesto, 01/05/2014, 03/05/2014, vendedor

    1, cambio puesto, 04/05/2014, 31/12/9999, supervisor

];

Right Join(T1)

LOAD * INLINE [

    Personal, Fecha, Hora Entrada

    1, 01/05/2014, 08:05

    1, 02/05/2014, 08:00

    1, 03/05/2014, 08:01

    1, 04/05/2014, 07:58

    1, 05/05/2014, 08:15

    1, 06/05/2014, 08:00

];

NoConcatenate

T2:

Load Personal,

  Fecha,

  [Hora Entrada],

  [Fecha Final],

  Movimiento,

  if(Len(Puesto)=0,Peek(Puesto1),Puesto) as Puesto1

Resident T1 Order by Personal,Fecha;

DROP Table T1;

Hi,

Not applicable
Author

Thank you very much, it's perfect.