Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklizzy
Creator II
Creator II

text object show the max date for current wait

hi

I have a cohort of people showing the time they came in and their associated EDwait

I have a text box that shows the number of these patient's waiting

=count({<MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>}  EventUniqueID)

the other box I need to show what the last persons wait was.. so I need a max of date but show the EDwait if you like ?

I tried this:

=Interval(max({<MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>} EDReadyWait)/24/60, 'hh:mm')

but this just gives me the max EDwait for all of those peopleI cant figure out how to add in the max date

thanks

15 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Give this one a shot:

FirstSortedValue({<

  EventUniqueID = P({<

  MetricDesc=,

  MetricID={'LI01'},

  Status-={'DISCHARGED','COMPLETED','LETTER'},

  Location-={'EAU'},

  ReadyStatus -={''}>

  }  EventUniqueID)

>} EDReadyWait, -assessmentdatetime)


Wrap this expression in an interval function if required

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
tresesco
MVP
MVP

I should have read your first post a bit more carefully. Try like:

=Interval(max({<EventUniqueID ={"=assessmentdatetime=Max(TOTAL assessmentdatetime)"}, MetricDesc=,MetricID={'LI01'},Status-={'DISCHARGED','COMPLETED','LETTER'}, Location-={'EAU'}, ReadyStatus -={''}>} EDReadyWait)/24/60, 'hh:mm')

qliklizzy
Creator II
Creator II
Author

Thank you! so much

I don't understand it - no way could I have figured that out!

thank you again

Liz x

qliklizzy
Creator II
Creator II
Author

its just returning -

thank you for you help, really appreciate it, Jonathon's reply has fixed the issue, you were on the right lines with firstsortedvalue

jonathandienst
Partner - Champion III
Partner - Champion III

I assume you are unsure about this bit:

EventUniqueID = P({<

  MetricDesc=,

  MetricID={'LI01'},

  Status-={'DISCHARGED','COMPLETED','LETTER'},

  Location-={'EAU'},

  ReadyStatus -={''}>

  }  EventUniqueID)


This set expression just selects the EventUniqueID values that fit with the selection criteria in your post. P() is possible values.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qliklizzy
Creator II
Creator II
Author

arh thanks brilliant,

and the first sort value gives me the latest assessment date on that set expression

good to know! thanks

I have used this twice now already, very handy!