Depends mainly on the Member´s level, I think. Higher levelled Pokemon usually get ahead on the lines.
However, since I saw this being contradicted on my very front, I'd say it´s based on IQ. My Altaria, for example, is on a higher level than my Vaporeon, but usually gets behind it when I play as a different Pokemon than these two.
I´m not sure, but if I would speculate, it´s either Level or IQ.