Lens Table - "wrong" selection of top N elements

Thanks for the quick reply @stephenb !

I am running Kibana 7.16.1. This is what my settings look like:

I realized that I'm also not using a "Quick Function", like "sum", but rather I have my own formula:

Screenshot from 2022-12-22 08-57-30

In this case a given file might be guarded (owned) by multiple people, so I need to divide by the number of guardians to get the real number of violations in a given file (otherwise it's double-counted).

If I switch over to using the Quick Function "sum", then I can choose "Rank by: Violations" and works as expected. Is there anything I need to do to enable Rank by using a custom formula?

Thanks!