Good questions. You can't get the sorted order inside eventstats. The list(Score) will put them in the order they are found, so they will not be sorted, and mvsort will not sort numerically, so cannot be used, so the mvfind will not get the correct position. The other issue with list(Score) is that it can only cope with 100 values, so it will fail at that point. As to whether there is an alternate solution, the following is probably a better option as it does not have the limitations of list() and does not require mvfind. It may be more efficient. | makeresults count=10
| fields - _time
| streamstats c as Score
| eval Student="Student ".(11 - Score)
| table Student Score
``` Above simulates your data ```
``` Generate list of scores and find position in results ```
| sort Score
| streamstats count as pos
| eventstats count
``` Now calculate ranks ```
| eval Rank_Inc=round((pos-1)/(count-1)*100, 0)
| eval Rank_Exc=round((pos+0)/(count+1)*100, 0)
| fields - Scores pos count You still have to sort the scores and it uses streamstats to identify position (rather than mvfind). I think there may be a difference in behaviour when there are multiple students with the same score. Using mvfind would always find the position as the first instance of that score, whereas using streamstats as above it would use the user's position. However, you could probably solve that issue.
... View more