http://www.who.int/vaccine_safety/in...en/index2.html

Math is hard though:

it is true that in an outbreak those who have been vaccinated often outnumber those who have not — even with vaccines such as measles, which we know to be about 98% effective when used as recommended.

This apparent paradox is explained by two factors. First, no vaccine is 100% effective. To make vaccines safer than the disease, the bacteria or virus is killed or weakened (attenuated). For reasons related to the individual, not all vaccinated persons develop immunity. Most routine childhood vaccines are effective for 85% to 95% of recipients. Second, in a country such as the United States the people who have been vaccinated vastly outnumber those who have not.

How these two factors work together to result in outbreaks in which the majority of cases have been vaccinated can be more easily understood by looking at a hypothetical example:

"in a high school of 1,000 students, none has ever had measles. All but five of the students have had two doses of measles vaccine, and so are fully immunized. The entire student body is exposed to measles, and every susceptible student becomes infected. The five unvaccinated students will be infected, of course. But of the 995 who have been vaccinated, we would expect several not to respond to the vaccine. The efficacy rate for two doses of measles vaccine can be as high as >99%. In this class, seven students do not respond, and they, too, become infected. Therefore seven of 12, or about 58%, of the cases occur in students who have been fully vaccinated."

As you can see, this doesn't prove the vaccine didn't work — only that most of the children in the class had been vaccinated, so those who were vaccinated and did not respond outnumbered those who had not been vaccinated. Looking at it another way, 100% of the children who had not been vaccinated got measles, compared with less than 1% of those who had been vaccinated. Measles vaccine protected most of the class; if nobody in the class had been vaccinated, there would probably have been 1,000 cases of measles.