I don’t understand what you are trying to get.
what is the rank between two dates?
besides that…the formula you used will give you the rank of date1 WITHIN each allocation date…for example…the max.date for 6/1/2010.
I don’t think that is what you are trying to accomplish.
maybe something like rank(date1;customer) so it will rank the max.date of each customer…in other words…the rank the customers in order of the last time a transaction was allocated for them.