Let $\mu$ and $\nu$ be Borel probability measures on $\mathbb R$, and assume that $\mu$ has no atoms. Write $F_\mu(x)=\mu((-\infty,x])$ and $F_\nu(x)=\nu((-\infty,x])$, and use the left-continuous quantile convention
\begin{align*}
F_\nu^{-1}(t)=\inf\{y\in\mathbb R:F_\nu(y)\ge t\}
\end{align*}
for $0<t<1$. Let $T:\mathbb R\to\mathbb R$ be a Borel map satisfying, at every point where $0<F_\mu(x)<1$,
\begin{align*}
T(x)=F_\nu^{-1}(F_\mu(x)).
\end{align*}
Assume also that $T$ has arbitrary Borel real values on the $\mu$-null endpoint set where $F_\mu(x)\in\{0,1\}$. Then $T_{\#}\mu=\nu$, and $T$ agrees on a full $\mu$-measure set with a nondecreasing function.