Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr/Max Question

I have a data set similar to this:

IDDateStdDayValue
A1/1/20141100
A1/2/2014250
A1/3/201435
B3/5/20141200
B3/6/2014250
C4/1/20141500
C4/2/20142400
C4/3/20143300
C4/4/20144100
C4/5/2014540

I need a formula that would return the sum of the 'Value' for the maximum 'StdDay' for each 'ID'.  The result for this example should be 5+50+40 = 95. 

Any ideas?

Thanks

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try:

sum(aggr(firstsortedValue(Value, -StdDay), ID))

Hope this helps!

View solution in original post

3 Replies
jerem1234
Specialist II
Specialist II

Try:

sum(aggr(firstsortedValue(Value, -StdDay), ID))

Hope this helps!

maxgro
MVP
MVP

maybe

=sum(aggr(FirstSortedValue(TOTAL <ID> Value, -StdDay),ID) )

ecolomer
Master II
Master II

Both answer are ok

Attached the QV