Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

30 day readmission

NPIV
5 - Atom

Hi,

 

I want to capture patients who have been readmitted within 30 days of their last discharge. 

 

I have attached example dataset, however, each patient could have 3 rows of interaction of 50. I've tried using the multi-row formula tool, but I can't count back a static amount of rows. 

 

Excel contains example data, the last two columns are the out put I'd like to create.

 

Help much appreciated.

 

 

3 REPLIES 3
Ladarthure
14 - Magnetar
14 - Magnetar

Hi @NPIV,

 

here is a draft solution I made, I first filtered to exclude all non admission and discharge, then calculated the difference in days between all the lines, and finally did a formula based on that.

 

Another solution would be to shift the data and have one column for admission, one for discharge, and then calculate the date difference between the previous row discharge and actual row admission.

afv2688
16 - Nebula
16 - Nebula

Hello @NPIV ,

 

I came up with this solution:

 

Untitled.png

 

Let me know if it works for you.

 

Regards

NPIV
5 - Atom

Thank you! Was almost perfect, just had to add a group by client id to the multi-row tool.

 

 

Labels
Top Solution Authors