Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Bonjour,
je veux calculer mois n et n-1 pour chaque agent j'ai utilisé l'expression suivante pour annee et mois n et ça fonctionne
if(MOTIF<>'Congé parental' and sum(((aggr(count(DATE_DEB_FIN),ANNEE,MOIS, MOTIF,TEMPS_TRAVAIL)/30)*TEMPS_TRAVAIL)/100)/12<>0,1,0)
par contre pour n-1 j'ai utilisé cette expression qui me retourne toujours 0.
if(MOTIF<>'Congé parental' and aggr(sum ({$<ANNEE={$(=max(ANNEE-1))}>}(count(DATE_DEB_FIN)/30)*TEMPS_TRAVAIL),ANNEE,MOIS),1,0)
Can you try this
If(Sum({$<ANNEE = {$(=max(ANNEE)-1)}, MOTIF = {'*'}-{'Congé parental'}>} ((Aggr(Count({$<ANNEE = {$(=max(ANNEE)-1)}, MOTIF = {'*'}-{'Congé parental'}>} DATE_DEB_FIN), ANNEE, MOIS, MOTIF, TEMPS_TRAVAIL)/30) * TEMPS_TRAVAIL)/100)/12 <> 0, 1, 0)
For all years it return a zigzag of 0,1
1. Result
2. But with the following expression i have the correct result for the last year (2017,2018) If i selected other year i have 0 in n-1.
Expression
if(sum(((aggr(count({$<ANNEE={$(=max(ANNEE)-1)}, MOTIF={'*'}-{'Congé parental'}>}DATE_DEB_FIN),ANNEE,MOIS, MOTIF,TEMPS_TRAVAIL)/30)*TEMPS_TRAVAIL)/100)/12<>0,1,0)
Result
Thanks.