Most likely is the cable if it was working before. It sort of clicks in with a click when it's all the way in. Check it also at the switch end, it might have unclicked there. If it's an 8000 switch (giant di2 paddles) the mechanism can act up, the 7000 switch (two buttons) is normally pretty bullet proof.
Weird thing thou when messing about with the cable it worked then I didn't etc so must be a break or something in the cable but sometimes the actual display faded out and the power switched off any ideas what that could be or is it all linked to the dodgy cable