Groups have something called group skills when you train those it adds to your power. When you leave a group you lose that boost, but if you join any group of same level or higher than the one you left you'll gain that power back.
The power you gain adds to your current power so yes, if you upgrade your current power and join a group again you power will be what you have now plus your group skills.