Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
covenant_bi
Creator
Creator

Absolute minimum value for table in Qlik Sense

We have a data set where we want to show the end user the minimum date that a result is returned for a lab test result.  We would like one row per patient identifier in a QS table.  We are just running a min(time_collected) and we get the results that we want.  However, we would also like to include the result code in the data set.  When we do this, patients that have different result codes get another row in the table because the table is evaluating the minimum for each result type and providing the result.  So QS is doing exactly what we told it to, but that's not what we want.  We only want the minimum date collected only.    We've used combinations of set analysis, ONLY, AGGR to try to get the one minimum row per patient result, but we usually end up with two.    So in the screenshot we don't want to see the row that has the I value, only S value.  However, we can't just exclude I values, because the minimum row may indeed be an I which is acceptable.  

We know that this is possible via load script, but we would like to have all the data in the app and we don't want to have to make another app just for this part of the data that the user wants.    Any thoughts?

2020-02-10 14_53_15-Clipboard.jpg

 

 

Labels (1)
  • Min()

1 Solution

Accepted Solutions
covenant_bi
Creator
Creator
Author

Hey, thanks for the response.   That worked, but it didn't provide the actual value.    I did some more research and settled on this firstsortedvalue(SUSC_GROUP,ResultKey).  ResultKey was an Autonumber we did in the load script on the result ID and another key.  This is providing results consistent with what we would expect.  

View solution in original post

3 Replies
petter
Partner - Champion III
Partner - Champion III

Try to do this:

  1. Remove the SUSC_GROUP as a dimension
  2. Add Only(SUSC_GROUP) as a measure / expression

 

covenant_bi
Creator
Creator
Author

Hey, thanks for the response.   That worked, but it didn't provide the actual value.    I did some more research and settled on this firstsortedvalue(SUSC_GROUP,ResultKey).  ResultKey was an Autonumber we did in the load script on the result ID and another key.  This is providing results consistent with what we would expect.  

petter
Partner - Champion III
Partner - Champion III

Please click the like button or heck if the response was correct you could even mark it as a correct solution.
Believe me - it will be greatly appriciated by the contributors ...
We love likes as much as anyone posting anything on social media