There’s is an issue, that even after complete wipe the system still considers user data partition encrypted, while data is available and no password is set. You can find some tutorials online, but most of them fail when it comes to Redmi 4X device. You can try to flash stock recovery or try the solution below.
Disable encryption from recovery on Redmi 4X (Santoni)
The solution is to boot into fastboot mode and wipe the partition which mounts to /userdata. To be clear, fastboot will create the partition again, without any encryption.
Decrypted partition will look like this: /dev/block/mmcblk0p24
While encrypted partition will have similar look: /dev/block/dm-0
TWRP Custom Recovery probably won’t help. So, to remove the encryption, boot into fastboot mode and use the following command:
fastboot format userdata
This will result in the removal of all personal data, there’s no way to avoid this.