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

Get value of the field by max value of another

Hi all,

How can I found value of one field, corresponded to max value of another field. In a chart

Example attached. Thank you

1 Solution

Accepted Solutions
rubenmarin

Hi Yuriy, set analysis won't work if you want to calculate it row by row, you can use an expression like:

Aggr(If(Date=Max(TOTAL <ID> Date), Sum(Value)), ID, Date)

View solution in original post

4 Replies
robert_mika
Master III
Master III

Try:

sum({$<Date={$(= max (ID))}>}Value)

rubenmarin

Hi Yuriy, set analysis won't work if you want to calculate it row by row, you can use an expression like:

Aggr(If(Date=Max(TOTAL <ID> Date), Sum(Value)), ID, Date)

yura_ratu
Partner - Creator II
Partner - Creator II
Author

I guess you meant

sum({$<Date={$(= max (Date))}>}Value)

Doesn't work. It tries to find max date from all model in every ID. But I need to calculate max date for every specific ID

yura_ratu
Partner - Creator II
Partner - Creator II
Author

Hi Ruben. It works! Thanks a lot