Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
dbombengeraurar
Contributor II
Contributor II

Transformer une table dans le script : Above() / Peek() ?

Bonjour,

Je dois calculer les mois de présence des collaborateurs de mon entreprise. Mais le format d'origine de la table que j'interroge ne me convient pas.

1. Ma table d'origine est construite de la façon suivante :

NumSalarieDateHistMotif
6801/09/2004Entrée
30002/07/2012Entrée
30031/12/2012Sortie
30006/02/2013Entrée
30004/03/2013Sortie

2. Pour exploiter ces données avec QlikView, je souhaiterai arriver au résultat suivant :

NumSalarieDateEntréeDateSortie
6801/09/2004
30002/07/201231/12/2012
30006/02/201304/03/2013

J'ai fait un tri des données par NumSalarié, dateEntrée Motif et j'essaye d'utiliser les fonctions peek() et above() mais après plusieurs tentatives, je ne trouve pas la solution.

Quelqu'un a une idée ?

Merci

10 Replies
hic
Former Employee
Former Employee

Sébastien

You are absolutely right. My script was the simplest possible approach, just to show that you can solve the problem. Your solution with a Join and a Group By assigns FirstActivity in a nice way. There are of course other possible solutions also, e.g. an additional pass through the data to check that each day has both an Entrée and a Sortie. Then you can handle exceptions in a well defined way.

HIC