how can I use the rank function if the value I am ranking is "selection.value" and the range is a known variable x?

Thanks,