If the powdered sugar was added too quickly and not allowed to incorporate properly, this could make your dough crumbly and difficult to roll into balls. Add the sugar slowly and stir well after each addition. Even if you did add the sugar too quickly, you can usually fix this if you just continue mixing (it will just take some time). Also consider if you may have accidentally over-measured your sugar, unfortunately this is easy to do when measuring with cups rather than by weight (which is why I always recommend using a kitchen scale). To properly measure sugar, gently stir it and then scoop into your measuring cup and level it off. Never pack it into the cup. All of my tips on how to measure flour properly apply to measuring sugar, too.