Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

max and corresponding value

MAX(TOTAL <key> date)

i have this expression and gives me a date as result. the date is linked to a caseid.

how do i get the corresponding caseid, based on the MAX(TOTAL <key> date) expression?

8 Replies
amien
Specialist
Specialist
Author

/bump

Anonymous
Not applicable

Try set analysis expression, something like this:

=only({$<date= {$(=max(total<key> date))}>} caseid)

amien
Specialist
Specialist
Author

not really working .. i have added a sample qv including your expression.

anyone knows whats wrong?

amien
Specialist
Specialist
Author

/bump

Not applicable

Hi,

try only(if(date=aggr(nodistinct max(date),key),case_id2))

Alex

amien
Specialist
Specialist
Author

Thanks .. works . .only problem is that if there are more then one cases where date = max(date), cell is empty .. so i changed only to max

amien
Specialist
Specialist
Author

correction on last post:

why are you comparing date with max(date)?

isnt MAX(TOTAL <key> date) enough?

Not applicable

I just applied this to an equivalent problem, and it worked fine.

Thanks!