I have a Dyson DC77 animal + allergy upright vacuum. I assume the design of my vacuum is similar to the DC24. The DC77 is bigger and has added paper filters behind the "ball" wheels. I had the same problem with mine. A small lever switch inside the vacuum "ball," which controls power to the beater brush, is turned on when you move the handle from the vertical position to any other position, and turns it off when you place the handle back in the vertical position. If you remove the "ball" wheels you should be able to see the switch on one side, and the plastic assembly that turns the switch on and off when you move the vacuum handle upright vs. horizontal.
In my case, the beater brush was intermittent. Sometimes it would run and sometimes it wouldn't. Once I disassembled my vacuum far enough to access the switch, I checked the continuity of the switch as I pressed down on the switch. Though it seemed unlikely, I actually found a dead spot on my switch after it turned on, but while pushing the switch lever further down to the final "on" position - same as the vacuum handle in full horizontal position - the switch turned off and then back on again once it reached the final "on" position. I know the beater brush has stalled on a piece of yarn from the carpet, and suspect it may have burned a spot into the switch due to the power surge that occurs when an electric motor stalls out.
On the power supply board inside the "ball" that provides power to the beater brush motor, I unplugged and re-plugged the wires on the power supply board to make sure they were making contact. I ordered 2 switches (one back-up), and reassembled my vacuum until the parts arrived. What's interesting, is that I still haven't put the new switch into my vacuum. My vacuum started working OK after I reassembled it while waiting for the parts to arrive. I know my switch has a bad spot, but it's working. It's possible that the wires to the switch came loose from the motor or motor power supply, and my "playing" with the wires fixed the problem - I'm not sure, but I at least I have two new switches on hand when the beater brush finally stops turning permanently.
One final note, it looks like the lever switch is soldered or welded to the wires. I can't tell for sure, because the switch terminals/exposed wire ends are covered with heat shrink tubing. If you have to replace the switch, you may want a couple of pieces of heat shrink tubing on hand to restore your vacuum to its original condition. You may be able to buy the switch with the wires attached, but all I found was the bare switch, which I bought from PartsDirect.com