Its not the switch; it never is.
First try resetting it. Press the red button on the side of the brush roll a few times. If that doesn't work, suspect a brush bar motor. It is a known fault on the DC24. There is an article here on the subject:
http://dysonmedic.co.uk/dyson-dc24-brush-bar-motor/
Angus Black
October 2011