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

Help : nobody has found a solution ? Aggregated functions

Hi

I have a table with the values above :

PRESCRIPTEUR_NUM          DATE_PREVISION               REALISATOR

12523                                   04/09/2012                              karine

12523                                   06/09/2012                              paul

12524                                   04/10/2012                              lea

12525                                   05/10/2012                              karine

12525                                   05/10/2011                              karine

12526                                   01/11/2011                              fred

I want to find, in a chart, the Realisator for the max of the date for each PRESCRIPTEUR_NUM

In the example, I want to find :

PRESCRIPTEUR_NUM          DATE_PREVISION               REALISATOR

12523                                   06/09/2012                              paul

12524                                   04/10/2012                            lea

12525                                   05/10/2012                              karine

12526                                   01/11/2011                              fred    

Attached my document

Thanks a lot

1 Solution

Accepted Solutions
Gysbert_Wassenaar

You can try using the firstsortedvalue function. See attached qvw. You do need to decide how you want to handle cases where there are several realisator values for the maximum date of a prescription_num. In such cases the firstsortedvalue function cannot return a result since there's not enough information to determine which value is the correct value to return.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

You can try using the firstsortedvalue function. See attached qvw. You do need to decide how you want to handle cases where there are several realisator values for the maximum date of a prescription_num. In such cases the firstsortedvalue function cannot return a result since there's not enough information to determine which value is the correct value to return.


talk is cheap, supply exceeds demand