Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get days and records between events?

I need to get number of days between two events, to  know which patients did a same event in  less seven days.

The orginal data is like as follow:

PatientIDPatientDate EventHour EventEventIDNumber of days between surgeries
0122GABRIEL01/12/201322:35:000055|0004|00172627|00000004
0122GABRIEL03/12/201311:15:000055|0004|00172525|00000034
5444FABIOLA07/12/201307:43:000055|0004|00172781|00000020
6231TIAGO03/12/201317:34:000055|0004|00172633|00000021
1010DEBORA01/12/201322:47:000055|0004|00172631|00000047
1010DEBORA06/12/201307:12:000055|0004|00172492|00000035
2040KARINA04/12/201315:56:000055|0004|00172593|00000059
5023MAGALI01/12/201319:30:000055|0004|00172627|00000011
2456MARIA01/12/201311:16:000055|0004|00172621|00000031
3333JORGE01/12/201314:46:000055|0004|00172627|00000017
3333JORGE03/12/201318:22:000055|0004|00172633|00000033
1 Solution

Accepted Solutions
Not applicable
Author

I used this in the graphic function:

If(PatinetID=Above(PatinetID),DataEvent-Above(TOTAL DateEvent))

View solution in original post

4 Replies
MK_QSL
MVP
MVP

Like This?

Not applicable
Author

Hi!

I linked this with the function "above" and could use in the graphic function.

Thanks!

MK_QSL
MVP
MVP

Please close thread by selecting appropriate answer.

Not applicable
Author

I used this in the graphic function:

If(PatinetID=Above(PatinetID),DataEvent-Above(TOTAL DateEvent))