Conversion of units for concentration: mol/l to ppm
Convert mol-dm^2 to grams/volume.  A decimeter is 10 cm.  A dm^3 is then a liter.  Water has density ~1 g/cm^3.  Multiply the g(Mg)/g(water) by a million.