There are multiple ways to control distance from a greenside bunker, taking more sand or less sand will vary the distance. You can change clubs and use different lofts for varying the distance. For me if the ball is close to the green I prefer more loft and less sand which provides more spin and stops the ball quicker. For longer greenside bunker shots I prefer my gap wedge and taking a little more sand which allows the ball to roll out a little more. You should practice with multiple clubs and many different lies in the sand to learn what you do the best. Remember the type of sand can have a huge effect on your shots as well, soft sand or harder more compacted sand. Try to practice in all of it.