There could be a few things that would cause your Dyson to do this. I will give you detailed step by step instructions along with pictures on how you can diagnose this problem.
Possible Problem #1. The first problem is extremely common to see. In fact, we probably see between 2-3 of these exact problems each week. It mostly happens after people take the bottom plate off of the vacuum cleaner in order to clean the roller brush. What happens is that when they go back and reinstall that bottom plate, it gets put on incorrectly. It's actually extremely easy to do. When the bottom plate (soleplate) is installed wrong, there will be a gap between the bottom plate, and the agitator housing that the roller brush is contained in. This causes the soleplate to be a few inches higher off the ground then it should be, also preventing the brushes from even hitting the carpeting. This makes it seem to the user that vacuum has lost suction power because without the brushes hitting the carpet, the machine will not pick up very much, but when they use the attachment hose there's plenty of suction power.
Here's a picture of the WRONG way to install the bottom plate from a customers vacuum that appears to have done just this. Notice the gap in between teh two housings:
Here's another picture, this time of the RIGHT way to install the soleplate:
You should definitely check the first possible problem first. I would say probably 6 times out of 10 this is the problem with the customers machine. If you checked the soleplate and it is installed correctly, move on to the second possible problem.
Possible Problem # 2. Turn the vacuum cleaner upside down so the brush roller is facing upwards. I found the easiest way to work on it is to put it on a counter top or work bench. On the left hand side behind the roller brush you should see a flexible transparent hose that goes from the vacuums motor to the agitator housing. This hose actually has a lot of strain on it when the vacuum cleaner is in the upright position. When the first few series of Dyson DC07 models came out, they didn't make this hose long enough, so when the vacuum was in the uprigth position, it would cause too much stress on this hose, and cause the hose to actually crack, usually right where the end of the hose connects into the agitator housing. Examine your hose and see if you have any visible cracks in this hose. If you need to you may just remove the entire hose assembly by pulling on it. It will easily come right out of the vacuum so you can see it better. Here's a picture of where the hose usually cracks:
This would also explain why the vacuum works fine when using the attachments, but not on the floors. The attachment hose uses a different suction channel, and when the machine is in the upright position, no suction goes through this hose. If you do find a crack in this hose, you may purchase the Dyson DC-07 & DC-14 Upright Replacement Internal Hose Part # 904219
from our website, GoVacuum (dot) com.
Possible Problem #3. I would suspect that this may not be the case, but if the neither of the solutions above worked, then try this one. Dyson's in general are prone to cloggs. There are a few clog ports throughout the vacuum cleaner that were added there due to Dyson prototypes becoming clogged at these points. Here's a few pictures of how and where to check for these clogs. Simply remove the suction port covers at both of these locations:
Possible Problem #4. If none of the above solutions worked for you, try this last one (maybe this should have been first?). The Dyson DC07 models use a clutch mechanism that stops the roller brush from spinning when changed from carpet mode to bare floor mode. This clutch mechanism is a notrious problem as well with Dyson models, in fact they were such a problem that Dyson had to redesign the DC07 model to a non-clutch system. Even if yours is one of the newer ones that don't use a clutch, yours still has a belt inside. You can tell if your model uses a clutch or not by the shape of the roller brush. If your brush is a perfect cylinder shape, yours does NOT have a clutch. To check and see if the clutch or the belt have gone bad, first release the handle on the vacuum as if you were vacuuming carpets. Make sure the machine is set to carpet mode. Now while the handle has been released, turn the machine upside down and see if the brushes are spinning. If the brushes are spinning then turn the vacuum right side up and put the brushes on the floor. Can you still hear the brushes spinning when they hit the carpeting? If yes, then this is not your problem. If the brushes however are NOT spinning, this indicates either your brush roll, clutch, or belt have gone bad.
These are the only things that I can think of that would possibly cause the vacuum to work well in attachment mode, and bad on carpet mode. I would like to try and figure out with you what the issue is, especially so I can be aware of a new problems with Dysons. Please feel free to use the Clarification request to ask me any questions, or if you have any problems. If none of these solutions worked, please let me know so I can try and look further into it.
If this repair was helpful to you, please be sure to rate this repair as helpful by clicking the thumbs up icons in the top right hand corner of the repair. Thanks so much, I hope that this helped you!