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

Calculating Length of Stay

Dear gurus, I've encountered difficulty in calculating the length of stay accurately. I've attached some samples in the excel. I've used two calculations, but both options have their flaws. 

 

Kindly shed me some light on how to solve this issue!

 

Cheers!

5 Replies
shiveshsingh
Master
Master

May be this can help

 

Interval([Date of Discharge]-[Date of Admission],'DD')

 

Capture.PNG

tresesco
MVP
MVP

What options did you try?
[Date of Discharge] - [Date of Admission] ... should work. If that's not working try to share your sample app.
qlikhereqlikthe
Contributor
Contributor
Author

Sorry, I didn't make myself clear in the question. My length of stay is calculated using the formula: Interval ('Date of Discharge'-'date of Admission', 'DD').

My question is when i only want to count the length of stay for a claim number. note that for claimant 2, all the date of discharge is the same and all the date of admission is the same. So if i were to use the formula SUM(TOTAL <Claim Number> Length_of_Stay), it would be doubled, tripled,.. counted.

Cheers. Appreciate your prompt reply though!!!!!!
shiveshsingh
Master
Master

Try this

sum(total<Claim_Number> Interval([Date of Discharge]-[Date of Admission],'DD'))

If this doesn't work , share a sample file and expected output too.

anushree1
Specialist II
Specialist II

The issue here is Length of stay is also defined by Benefit_Code, so you will need to either add benefit code to your chart or make it hidden in the chart as attached, hope i meant some help here