Rank a list o fusers based on a number

Hi guys

I was wondering if we can do a rank function based on a goal number, for example 10,000, and each user can be ranked from the closest to the furtherest away from the number. (I want to do this way because I have any database related to user that contain a number so I want to rank who have the highest number.)

Best
Max

sort by user’s number. There is no need to determine how far a number is from a goal number.

Hi there, thank you for the reply, what I am trying to compare is to a database (combined weight lifted) belonged to the user, so I don’t think just take the user’s number is possible…

Regardless of the goal or combined number a rank is a rank and can be acheived with a sort. If you want something else…

I played with sorted and i made it to work, thank you!