Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nudjaree1
Partner - Contributor III
Partner - Contributor III

Get first row number from that return from aggr()

Hi, 

Is it possible to get the first NO of Sum(Aggr(if(Value = Max(Total<ID>Value), 1, 0) , ID, No))

IDNoValue
1111
1230
1330
2140
2240
2310
3110
4110

 

This is my expect result.

ID  Max  Count No

1   30       3         2

2   40     3           1

3     10    1           1

4   10     1            1

 

Thank you 🙂 

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

Try this expression:

min(if(Value=aggr(max(Total <ID> Value),ID,No),No))

View solution in original post

2 Replies
GaryGiles
Specialist
Specialist

Try this expression:

min(if(Value=aggr(max(Total <ID> Value),ID,No),No))

nudjaree1
Partner - Contributor III
Partner - Contributor III
Author

Thank you GaryGiles