Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
fallenangel6
Creator
Creator

How to fetch id with maximum date?

 

Hi All,

I have below data with me. 

clsid partyidaccountidAccountOpeningDate 
12111111123100023-05-2016
12111111123500024-03-2017
12111111123300012-03-2019
12111111123399925-09-2016

 

i want the below output from this. Please help. i want the record with account ID which is the latest.

clsid partyidaccountidAccountOpeningDate 
12111111123300012-03-2019
1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

FirstSortedValue(clsid, -AccountOpeningDate)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Something like:

FirstSortedValue(clsid, -AccountOpeningDate)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pradosh_thakur
Master II
Master II

Dimension1 - clsid

Dimension2 - partyid

 

Measure1 - FirstSortedValue(accountid,-AccountOpeningDate)

Measure2 - FirstSortedValue(AccountOpeningDate,-AccountOpeningDate)

Learning never stops.
fallenangel6
Creator
Creator
Author

Hi,

what if i have this data

 

clsid partyidaccountStatusaccountidAccountOpeningDate 
12111111123Active100023-05-2016
12111111123Active500024-03-2017
12111111123Closed300012-03-2019
12111111123Closed399925-09-2016

 

and my desired output is as below,

 

clsid partyidaccountStatusaccountidAccountOpeningDate 
12111111123Active300012-03-2019