Unlock screen by pressing power button, stop/save your activity and then you can power off your device with the power button. If you power button is broken, then it could be a problem....
If you connect your device to a power source or USB port, then hold the power button in for up to 15 seconds, do you see the display turn off? This would help us determine if your power button is working.