Spatially resolved functional grading is a key differentiator for additive manufacturing, achieving a level of control that could not be realised by conventional methods. Here we use the rapid solidification and thermal strain associated with selective laser melting to create an in-situ microstructurally and magnetically graded single-composition material, exploiting the solid-state austenite-martensite phase transformation. The fine grain sizes resulting from high cooling rates suppress the thermal martensite start temperature, increasing the proportion of retained austenite. Then the thermal strain accrued during the build causes in-situ deformation-driven martensitic transformation. By controlling the thermal strain, through appropriate selection of build parameters and geometry, we have been able to control the final ratio of austenite to martensite. Fully austenitic regions are paramagnetic, while dual-phase regions show increasingly ferromagnetic behaviour with an increasing proportion of martensite. We exploit this to build a magnetically graded rotor which we run successfully in a synchronous motor.