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: 
kjeffries16
Contributor II
Contributor II

Multiple Times Min/Max in Data Load

Hello,

I am having trouble creating a flag with a field that a patient entered the room in between certain time blocks. The Surgeon has two different blocks of time 07:30-11:30 and 11:30-13:30.  I want to be able to see how many patients entered within the 07:30-13:30 timeframe for that particular day.  I've tried Min/Max with my SurgeonTimeKey without success:

I'd Like DailySurgeonStart to have 07:30 instead of 11:30 for the one block of time.                        

SurgeonTimeKeyBlockStartTime1BlockEndTime1BlockTimeKeyDailySurgeonBlockStartDailySurgeonBlockEnd
1234507:3011:30987111:3013:30
1234511:3013:30987211:3013:30

 

Thanks for any help!

 

Kim

Labels (2)
1 Reply
Vegar
MVP
MVP

I assume that in addition to this posted table you have a list of patients who entered containing the time of entry? Then you could do an interval match.

PatientEnteringData:
Load
PatientEnterTime,
PatientId,
Etc..
From PatientEnterData;

SurgeonBlocks:
Load SurgeonTimeKey,
BlockStartTime1,
BlockEndTime1,
BlockTimeKey
FROM SurgeonBlockData;

LinkTable:
Intervalmatch (PatientEnterTime)
LOAD BlockStartTime1, BlockEndTime1
Resident SurgeonBlocks;

Selecting the surgeonTimeKey 12345 will give you access to all patiens entered between 07:30 and 13:30.

PS: This will give you an synthetic key, but it is considered OK (some say "best practice") with a synthetic key when doing a interval match.