Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
Staff | Motion | Date | Final date | Post |
---|---|---|---|---|
1 | I change position | 01/05/2014 | 05/03/2014 | seller |
1 | I change position | 05/04/2014 | 31/12/9999 | supervisor |
Example Assistance
Staff | Date | Time Entry |
---|---|---|
1 | 01/05/2014 | 8:05 |
1 | 02/05/2014 | 8:00 |
1 | 05/03/2014 | 8:01 |
1 | 05/04/2014 | 7:58 |
1 | 05/05/2014 | 8:15 |
1 | 05/06/2014 | 8:00 |
Need to unite, join me in making the delivery the following table
Staff | Date | Time Entry | Final date | Motion | Post |
---|---|---|---|---|---|
1 | 01/05/2014 | 8:05 | 05/03/2014 | Position change | Seller |
1 | 02/05/2014 | 8:00 | - | - | - |
1 | 05/03/2014 | 8:01 | - | - | - |
1 | 05/04/2014 | 7:58 | 31/12/9999 | Position change | Supervisor |
1 | 05/05/2014 | 8:15 | - | - | - |
1 | 05/06/2014 | 8:00 | - | - | - |
But to know that since I was in any day I require the table like this:
Staff | Date | Time Entry | Final date | Motion | Post |
---|---|---|---|---|---|
1 | 01/05/2014 | 8:05 | 05/03/2014 | Position change | Seller |
1 | 02/05/2014 | 8:00 | - | - | Seller |
1 | 05/03/2014 | 8:01 | - | - | Seller |
1 | 05/04/2014 | 7:58 | 31/12/9999 | Position change | Supervisor |
1 | 05/05/2014 | 8:15 | - | - | Supervisor |
1 | 05/06/2014 | 8: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:
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 |
Ejemplo Asistencia
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 |
Necesito unirlas, al hacer el join me entrega la siguiente tabla
Personal | Fecha | Hora Entrada | Fecha Final | Movimiento | Puesto |
---|---|---|---|---|---|
1 | 01/05/2014 | 08:05 | 03/05/2014 | Cambio Puesto | Vendedor |
1 | 02/05/2014 | 08:00 | - | - | - |
1 | 03/05/2014 | 08:01 | - | - | - |
1 | 04/05/2014 | 07:58 | 31/12/9999 | Cambio Puesto | Supervisor |
1 | 05/05/2014 | 08:15 | - | - | - |
1 | 06/05/2014 | 08:00 | - | - | - |
Pero para poder yo saber que puesto era en cualquier día yo requiero la tabla de esta manera:
Personal | Fecha | Hora Entrada | Fecha Final | Movimiento | Puesto |
---|---|---|---|---|---|
1 | 01/05/2014 | 08:05 | 03/05/2014 | Cambio Puesto | Vendedor |
1 | 02/05/2014 | 08:00 | - | - | Vendedor |
1 | 03/05/2014 | 08:01 | - | - | Vendedor |
1 | 04/05/2014 | 07:58 | 31/12/9999 | Cambio Puesto | Supervisor |
1 | 05/05/2014 | 08:15 | - | - | Supervisor |
1 | 06/05/2014 | 08: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
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,
try the attachment (I added another Staff and changed some date)
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,
Thank you very much, it's perfect.