Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Display Max(Date) where associated field is not null

Hello lovely people

IDDate
-03/07/2015
-02/07/2015
-02/07/2015
145A01/07/2015
268B01/07/2015
3092D30/06/2015

I would like to select the last record date where the ID isn't NULL.

I can do it in a chart, but I need to do it in a text box and can't for the life of me work it out.

Help!

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Hi Lewis,

=Date(Max({<ID={*}>} Date))

or

=Date(Max(If(Not IsNull(ID),Date)))

Regards,

Antonio

View solution in original post

5 Replies
Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

Try this

=Date(Max(Aggr(Date(Date),ID,Date)))

antoniotiman
Master III
Master III

Hi Lewis,

=Date(Max({<ID={*}>} Date))

or

=Date(Max(If(Not IsNull(ID),Date)))

Regards,

Antonio

MarcoWedel

=FirstSortedValue({$<ID={"*"}>} distinct Date,-Date)

hope this helps

regards

Marco

Not applicable
Author

Thanks for your help chaps.

Not applicable
Author

Thanks for your reply Gabriel. However, this gives me the last date in the table, regardless of whether the ID is null or not.

Do you have any other example that could satisfy this problem, but still use AGGR? I'm keen to get to grips with that function.