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

Latest date with data in other field

Hi all, I'm trying to show in as a KPI chart the latest date in which other field has data greater than zero.

This is what I have:

 

datethings
nov-193
dec-198
jan-2013
feb-2024
mar-2036
apr-200
may-200
jun-200
jul-200

 

In this example I'd need to show "mar-20" , which is the latest date where "things" has a value greater than zero.

 

Any ideas? I've tried to no avail:

Max(if ([things] = 0, date))

 

Thanks in advance.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this in KPI object.

=Date(FirstSortedValue(date,things*-1))

 

Make sure the "date" field is a proper Date field, meaning it is not a text value.

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this in KPI object.

=Date(FirstSortedValue(date,things*-1))

 

Make sure the "date" field is a proper Date field, meaning it is not a text value.

 

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
gbernabo
Contributor II
Contributor II
Author

Thanks, that worked!

 

IDK why, but Max(if ([things] > 0, date)) also works..