After entering a value for dimensions Blender shows zero
Dimensions are given in local view and your object is rotated around X. A way to see that is to activate the axis display option:



If you want to avoid that, the only way I know is what you stated in the comments: applying the rotation.