Discussion Board for collaboration related to QlikView App Development.
Hello everyone,
I need some help regarding the following problem:
I have a chart with the Dimension "PatientID" and I want to show as an expression for each Patient the oldest "Hb" value (marked values in the screenshot). As shown in the screenshot a patient can have different parameter values for a date. The relevant parameter (in this example "Hb") is stored in the variable "Para4PatOverview".
I have tried to implement this requirement with aggr and set analysis but I can't solve completely the problem.
The following code works, but only when one entry for the oldest date for a patient is stored in the dataset (green marked example).
=min(aggr(if(DiagramDate = | Min({<DiagramPar={$(Para4PatOverview)}>} DiagramDate), DiagramValue),DiagramDate)) |
When more than one entry is available for the oldest date for the patient (red marked examples) the code returns nothing.
I am grateful for any help.
Best regards,
Daniel
Can you give this a shot may be:
=FirstSortedValue(DISTINCT {<DiagramPar = {'Hb'}>} DiagramValue, -DiagramDate)
may be try
=min(aggr(if(DiagramDate=Min({<DiagramPar={$(Para4PatOverview)}>} DiagramDate), DiagramValue),DiagramDate,PatientID))
Can you give this a shot may be:
=FirstSortedValue(DISTINCT {<DiagramPar = {'Hb'}>} DiagramValue, -DiagramDate)
hi
you can use this expression
=if(DiagramDate =min(total <PatientID> {<DiagramPar={hb}>}aggr(min({<DiagramPar={hb}>}DiagramDate ),PatientID)),red())
Thank you, this solves my problem.