I do something similar but it relies on Data Analytics Data Translation Services.
I have it creating a custom data field that looks at the last character of the computer ID field.
RetValue=Right("!Computer.ID!",1)
This gives me 10 random groups so I can split up my deployments in 10% increments. Most of our deployments are done in 3 phases (10%, 40%, 50%)