Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculate Totals per each Month based on Start and End date

Hello,

I am calculating a Length of Stay (LOS), for which I use 2 fields (start_date & end_date) and the following logic.

end_date - start_date = Length of Stay (LOS in days).

The following is an example of my table and results.

IDend_datestart_dateLOS
16/20/176/15/175
26/11/176/10/171
36/10/175/10/1730

What I need is to calculate the number of LOS days occurred in each month.  For example. ID 3, has an LOS 30 days, but in 20 of the days occurred in the month May and 10 days occurred in the month June.

I believe my end result should be a table like this

IDLOS MayLOS June
105
201
32010

Which would allow to me to calculate that the Total Patient Stay days in May = 20 and in June = 16.

I am not sure how to tackle this problem.

If anyone can help, that would be greatly appreciated.

Thank you,

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be as at attached file.

Regards,

Andrey

View solution in original post

2 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi,

May be as at attached file.

Regards,

Andrey

Anonymous
Not applicable
Author

Большое спасибо !!!