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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Trying to return value if another value is the maximum

I was trying to do something like this:

if(Aggr(max(ModifiedDate), UserId, ReportStatus)  ...but it's not working.

In pure English, what I am trying to do is return a User's report status if their Modified Date is the latest.  Is something in my statement incorrect or am I approaching the problem incorrectly?

1 Reply
MayilVahanan

HI

Try with Firstsortedvalue() function

Ex:

firstsortedvalue(ReportStatus, Orderdate) gets the UserId with the minumum orderdate

firstsortedvalue(ReportStatus, -Orderdate) gets the UserId with the maximum orderdate

Refer this link

http://community.qlik.com/message/342392#342392

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.