Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a table like this :
Company | Transaction Id | Amount |
---|---|---|
1 | 20 | 10 |
1 | 19 | 9 |
2 | 18 | 5 |
2 | 17 | 6 |
3 | 16 | 2 |
3 | 15 | 6 |
And I'd like to get in a table, the maximum possible amount by Transaction Id per Company, that will be --> 10 + 5 + 2 = 17.
This is what I'm trying :
num(sum( {$ < [Transaction Id] = {$(=max([Transaction Id]))} >} Amount),'#.##0,00 €')
aggr( num(sum( {$ < [Transaction Id] = {$(=max([Transaction Id]))} >} Amount ),'#.##0,00 €') , Company )
But I only got the maximum value of the maximum Transaction Id.
I've attached the example.
Do yo know how to get my desired result?
Many thanks in advance!
Hi
This should do what you want if I have understood you correctly
Sum(Aggr(FirstSortedValue(Amount, -[Transaction Id]), Company))
HTH
Jonathan
Hi Marcel
Here it is
best regards
Chris
Hi
This should do what you want if I have understood you correctly
Sum(Aggr(FirstSortedValue(Amount, -[Transaction Id]), Company))
HTH
Jonathan
Thanks guys!
It worked with firstSortedValue. Thank you guys!
=FirstSortedValue(Amount, -[Transaction Id]) is much better !
Thanks Jonathan