Hello,
The absence software gives me one absence per day, per ID and per absence reason.
I try for each id and each reason for absence to define what is the interval of absence to then be able to calculate an end date of absence.
For my workflow, I tried to set a number for each absence range by calculating a DateTimeDiff between row-1[date de début] and row [date de début], and if that result was less than -1 tell it to add me 1 to the range of absence.
From number 2 I already have 2 "Code Evenement" in the same range.
I can't find any solutions.
Can anyone help me ? I attache my files to the post.
Best regards,
Léo
Solved! Go to Solution.
This data is VERTICAL. If you use a SUMMARIZE tool, you could GROUP BY the desired field(s) and then get the MAX([Date ...]). Then you could JOIN this data back to your incoming data and only get the record with the maxDate. Otherwise you could join it just on the person and apply the max date to all records.
Does that make sense?
Cheers,
Mark
No sorry...
Can you attache a workflow please ?
For me, I can't define the MAX([Date ...]) if I have not already defined whether these dates follow each other and if they are part of the same absence ([Code Evenement])
Hi @lperetti I tried making some adjustments to your workflow. I think part of the trick is getting the sorting right. I found it works to sort by IUP then Date then Event Code, rather than by IUP then Event Code then Date.
e.g. For lines 5 & 6 below, both absences occur on the same date but event code is different. Does this mean the count should still increase? If yes, then sort by IUP then Date then Event Code before applying the multi-row formula.
I made some slight tweaks to your formula to group by IUP and account for whether the event code is different or not.
Edited workflow attached. Does this bring you closer to what you were looking for?
That's perfect, thank you very much ! 😀💪