$${2700 \frac{\textrm{kg}}{\textrm{m}^3}=\frac{2700 \cdot {1000}\textrm{g}}{1\cdot 1000 \textrm{dm}^3}=2700 \frac{\textrm{g}}{\textrm{dm}^3}}$$