A common problem with vacuum cleaners is a broken conductor inside the cable - at the plug end - from enthusiastic tugging.
Test for it by messing with the cable close to the plug then you'll know.
The fix is to cut away the plug and a few inches of cable and to fit a new plug - quick - cheap & easy.
Good Luck..., January 2017