Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Days allocation with 2 dates

Hi everyone, I need your help. I’m working on a development about absenteeism, and I stuck with the actual data that I have.

At this day, my data is like this :

id_absB_date_absT_date_abs
1235401/01/201420/04/2014
145423/02/201425/03/2014
845430/03/201401/04/2014

The goal is to analyse the % of absenteeism regarding the month selected or the year. So, for the first line, we've got 31 days of absenteeism in January, and 20 in february. 

If I want to see the amount of days in february, it'll be 20 days (1st row) + 6 days (2nd row). What will be the best way to allocate those days for each months ?

Thanks a lot in advance.

10 Replies
marinasbc
Partner - Contributor III
Partner - Contributor III

Hi Manish,

This is really useful, thanks. Any chance you can shed some light on how to do this with hour detail?

I managed to work out the proportion in an expression but I can only use it when analysing by employee and month EmpHours_in_this_month = ( Total_EmpHours / Total_EmpDays) / EmpDays_in_this_month

I would like to do this on the script, can anyone help?

Thanks

Best Regards

Marina