Samsung Galaxy Tab Pro 8.4''
Android 4.4.2
But it charges normally when It is powered off.
It only charges when the tablet is off, possibly the USB charging port doesn't draw enough current.
Use this tool to help you:
usb voltage current meter | eBay
Read the output of your charger, if it's 5Volts, 2 Amps, the charging current reading should be 1.5 Amps to 1.7 Amps. If the reading under 1.5 Amps, you should swap USB cable, charger with a known working ones. If nothing changes, you have a bad USB charging port. Search new one on Ebay, it's from $3 to $10, depending where you buy, cheapest is from China.
These steps by steps, you have to do it by yourself, no one can give a specific answer for many unknowns: USB cable, or charger, or USB port, or battery.
Everyone is guessing as you are without no clues.