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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
inescastelhano
Partner - Creator II
Partner - Creator II

Straight table with different attributes

Dear all,

I would like to have a table relative to an hospital priorization (triage) according to manchester priorization (like red bracelet - emergency, orange bracelet - very urgent, yellow -urgent , green - not urgent). This triage can occur several times, if the patient's health gets worse.

So , lets imagine that a patient gets a green bracelet at 15:00:00h. At 16:00:00h, he gets a new, orange bracelet. I would like to have a table where I display the last colour of the bracelet (orange) but calculate the time difference between now (18:00:00h) and the time of the first bracelet assignment (16:00:00h). Something like:

ID        Name         Colour      Waiting Time

123       John          Orange     2:00:00h (18:00:00h - 15:00:00)

Does anyone know if I can get this in a table?

Thanks in advance.

Inês Castelhano

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can use the FirstSortedValue function to retrieve the last colour: FirstSortedValue(Colour, -Time). The waiting time can be calculated with something like Interval(Now()- Max(Time),'hh:mm:ss')


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Not applicable

based on your example, wouldnt the first bracelet time be 15:00 - that is when he got the green bracelet.  Would you also want to keep track of the different bracelets the person receives?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You can use the FirstSortedValue function to retrieve the last colour: FirstSortedValue(Colour, -Time). The waiting time can be calculated with something like Interval(Now()- Max(Time),'hh:mm:ss')


talk is cheap, supply exceeds demand
Not applicable

Hi Inês,

Do you want a histoy of that? Or just the last?

Where QlikView enters here? This sheet will be updated manually?

QV has a function called Interval that you can use to show the "Waiting Time".

Something like this:

interval(vWaitingTime - now(), 'hh:mm:ss')

Giba

inescastelhano
Partner - Creator II
Partner - Creator II
Author

Correct, should be 15:00:00. I corrected it already. I don't want to keep track, I just want to show in the same row last colour and waiting time (using first hour/time).

inescastelhano
Partner - Creator II
Partner - Creator II
Author

Thanks, with your idea I got it working!

Cheers,

Inês