Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld online is next week! REGISTER NOW
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

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.

 

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

2 Replies
kaushiknsolanki

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.

 

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
gbernabo
Contributor II
Contributor II
Author

Thanks, that worked!

 

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