Np. Your example above, creates a vector for the 'length to scaler' to work out from (z,z,z) to (0,0,0). Which is sort of random.
You could define how far in X you want to go with conditional less than 10m = 1 elso 0. You could even use clamps to say, Clamp (0) (10) on the convert X to scaler. You could go further to say Clamp (0) (20), if X > than 10 then inverse modulo(X) 10, to get a fade off of 10m after 10m.