Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Partner
Partner

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

Tags (3)
1 Solution

Accepted Solutions

Re: Get value of the field by max value of another

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)

4 Replies

Re: Get value of the field by max value of another

Try:

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

Re: Get value of the field by max value of another

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)

Partner
Partner

Re: Get value of the field by max value of another

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

Partner
Partner

Re: Get value of the field by max value of another

Hi Ruben. It works! Thanks a lot