Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I need to put the name of the best Salesman (the one who sales the greatest amount) in a text box. I have used the following expression:
=FirstSortedValue(Salesman, Aggr(Sum([Total Sales]), Salesman), Count(DISTINCT Salesman))
It works but is not as smart as I would like. For example, I have to put a third parameter: Count(DISTINCT Salesman), to get the last position in the list of salesmen by sales as it is ordered in ascending order...
Sure that a better way exists... Any idea???
Come on, it is friday... 😉
Regards,
H
Try
=FirstSortedValue(Aggr(Salesman, Salesman), -Aggr(Sum([Total Sales]), Salesman))
Try
=FirstSortedValue(Aggr(Salesman, Salesman), -Aggr(Sum([Total Sales]), Salesman))
Hi Héctor,
try With rank like this: IF(aggr(rank(sum(Sales)),Saleman)=1,Salesman)
or try with this, a - infront of the aggr: FirstSortedValue(Salesman, - aggr(sum(Sales),Salesman))
Hi,
Thanks to all! Very good solutions all of them!
Regards,
Héctor