Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am working on selecting the highest performer in a certain type of sport. So, I need my text object to return a name for the highest number of scores, and currently the expression is
= only({<Sportsman={"=rank(sum([Total Number of Points Scored], Sportsman)=2"}>} Sportsman),however it doesn't work and only returns a '-'. Can anyone help with this please?
Thank you,
Anna
Try =FirstSortedValue(Sportsman,-aggr(sum([Total Number of Points Scored]),Sportsman)) for the name of the sportsman with the highest score. For the second highest use =FirstSortedValue(Sportsman,-aggr(sum([Total Number of Points Scored]),Sportsman),2)
There is a closing bracket ) missing in your advances search expression and I think you should remove the second argument from the rank() function:
= only({<Sportsman={"=rank(sum([Total Number of Points Scored]))=2"}>} Sportsman)
Thanks, Gysbert, that worked for the highest one. What about the lowest?
remove the - character in front of the aggr.
Thank you!
what if I want to list all sportsmen that have the same highest value?
In that case try with concat() function like:
= Concat({<Sportsman={"=rank(sum([Total Number of Points Scored]))=2"}>} Sportsman, ',')
thank you for that. and the case for listing all sportsmen that have the same lowest value?
This?
= Concat({<Sportsman={"=rank( - sum([Total Number of Points Scored]))=1"}>} Sportsman, ',')