Wery, common beginning 3d problem to think thats the case but it isnt! The angles arent 45 45.... Just so you know. Try thinking thsiway if you first turn 45 degrees then how much must you must turn along the other axis to get it straight up (se the prblem as shifted with 45 degrees by the time the second angle is turned!). Draw a picture it will dawn on you (especialy if you draw a picture of a already one axis rotated 45 degrees).
I can perfectly understand this (buy if you ever want to be good at 3d is sugget you do calculate).
Its easiest to do like this if you dont want to calculate. Make a cube place the pivot in the most -z -x -y corner! create a locator and place it to the most +x +y +z corner (the opposite). Select the locator and cube (holding shift down idividualy in that order). Choose constrain aim [] select the square icon. and type theese values
aim vector 1 1 1
up vector 0 1 0
up type vector
world up 0 1 0
and then move the locator to above the last point!
If you want to calculate tough!
Dont read its a spoiler
The true values are:
45 and
atan(sqrt(1/2)) wich is something close to 35.264 for the next axis use atand if you use maya expressions to signify you want degrees out of the equation.
if you want to calculate it. Note thet the contrain method does rotate about ista xis for a arbitrery rotation.