Personally my portfolio is quite broad in that it stretches from interface and web design to logos, brochures, posters and even illustration. I do this because I tend to work on a project by project basis. I don't like the idea of somebody telling me that purely because I haven't done something before that I am going to be terrible at it. There is of course a possibility that this is the case but most of the skills in the field of graphic design are transferable. e.g.. If you have done something remotely similar to the proposed project you will probably have a good idea before you've even started where your strengths and weaknesses are going to lie. So it is really about using your discretion (and being honest with yourself) about what you can reasonably achieve. If I thought for example that I was capable of coding an entire e-commerce from scratch but had never done it before then what I would do before pitching for the project is do my research! I would find out all the extra resources that were involved how long it takes your average experienced e-commercer and factor in learning time for any thing that I don't already know how to do. If this then seemed like an unreasonable assertion on reflection I wouldn't bother to pitch for the project. But, if I still felt confident after all this then I would pitch for the project and go about putting together the bare bones of the project to send out as an example or sort of insurance for the potential client. Now in a position like that you have not only gained knowledge of a new potential avenue you have also gained albeit a small amount, but some form of experience in the field and a little something to put in your portfolio, and this is all even if you don't win the client. So for me this is a worth while endeavour. I know most of you creatives out there are generally talented little buggers who will thrive in any environment given the right incentives so whats wrong with a little dabbling??
Now the reason I defend the broad portfolio so much is because it opens doors. If you have only ever worked in web then it is likely that you will only ever work in web. The work you do leads you to other similar work and that is a fact. There is s always nothing stopping you from doing self set projects in the other specialisms that you would like to try or move into, but this of course takes time to build up and says nothing of your ability to apply it in a commercial environment. The only problem with this proposed approach is that generally it makes you seem like a bit of a wild card. The testimonial is your friend in this instance. If you have previous clients with whom you have been bunged a challenge and succeeded then by all means go about getting that recommendation because it will be what sways your new client or employer into believing in you. You don't want to be in a scenario where it is just your word against theres and back up never hurts you. There is also another point to having a broad portfolio and it is because it shows your potential employer or client (I know I have used that sentence already no need to be pedantic) that you are capable of growing and adapting with the times. This is a massive bonus. Technology as we all know is changing, expanding, evolving, whatever you want to call it, at a ridiculously fast rate these days and people have barley time to figure out how to use it before the next thing comes out. With the exception of the intuitive design model thats gaining popularity across the board and was largely introduced by apple products, this is not going to change any time soon. So basically what I am getting at is that wether you like it or not you are going to have to re-skill in this business a lot and having that broad portfolio showcases your ability and willingness to do so.
There is of course a down side to having a broad portfolio and this one comes up for the more project by project basis. If you are trying to win over a freelance client as an example for lets say a packaging design on a new shaving product. You as the broadly skilled designer will likely have some good examples of similar packaging work. They may have even been for some major blue chip clients but if you are in direct competition with another designer who solely works in packaging! then the chances are you are going to lose this battle. They simply have a far better arsenal of project specific work and the years of experience to back it up than you do, which is all fairly obvious stuff but worth mentioning anyway. This is not me by any means suggesting that you shouldn't bother trying to get projects that are highly specific just a word to the wise. So all in all I am confident that benefits to having a broad spectrum of work far outweigh the negatives and give you as a designer a much better sense of your abilities in that you have stepped out of your comfort zones regularly. I can at this point therefore only advocate the same for all aspiring designers. Do everything try everything make it good. That is all.