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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set analysis (Latest value)

ID
# OF PAYMENT
Value
0011100
0012150
0013175
002150
0031100
0032100

This expression =SUM({$<[# OF PAYMENT]={$(=max([# OF PAYMENT]))}>}Value) returns value= 175 because it has the latest  payment which is not the desired result.

I need an expression that returns 175 +  100 + 100 = 375  because the latest payment for ID 001 is 175, ID 002 IS 50 and ID 003 is 100.

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try =sum(aggr(FirstSortedValue(Value,-[# OF PAYMENT]),ID))

btw, the result is 325, not 375


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try =sum(aggr(FirstSortedValue(Value,-[# OF PAYMENT]),ID))

btw, the result is 325, not 375


talk is cheap, supply exceeds demand
preminqlik
Specialist II
Specialist II

hi,

PFA

hope it helps u

regards

Premhas

Anonymous
Not applicable
Author

Thanks alot guys