Hi,
I am fairly new to this forum so please excuse me if I do not follow some guidelines I am not aware of.

My question is for a dataset that contains variables such as Reported Income, Region etc.

I want to create a rank variable between 0 and 1. Essentially I would like to rank all the incomes into a reference group (lowest to highest so that 1 will be the highest income) and divide that number by the total number in the reference group.
My reference group is region, so for example all in London, all in Wales etc.