A couple of potential issues here.
I noticed that your formula creates Y2 as a character string. I don't think I would do that. If Y2 is a continuous measure (and mm seems to fit that definition), then I would treat the value as continuous.
The other issue is that as Y1 goes up, Y2 is going down. This will cause the mis-match on the scaling.
I see two possible approaches. Both of them would have you create Y2 as a numeric value.
Approach Number 1: Make Y2 an exact copy of Y1, but then specify value labels to change them to be the mm result. Because you are not changing the actual data, it will be plotted in the correct order and at correct locations, but you are only changing the value that is displayed. The disadvantage is that if you have a true function to compute the mms, then there could be lots of typing for the various mm settings.
Approach Number 2: Use your formula for Y2, except make it numeric, not character. Drag Y2 into the Graph Builder and move it to the right-axis. Now right-click the right axis and choose Axis Settings. In the upper-left of the dialog box, check the "Reverse Order" box. That should solve the problem.
Dan Obermiller