i have basically always struggled with dandruff, and have had trouble finding a solution that worked consistently--some products seem to work for a bit, but then eventually seem ineffective.
i went to a dermatologist because my dandruff was bothering me so much; he explained he was pretty sure i have seborrheic dermatitis, which can just express itself as a chronically flaky scalp.
his solution for me was to cycle through three kinds of shampoo for a few weeks at a time: one prescription ketoconazole shampoo, then regular Head+Shoulders and Selsun Blue. i also get a prescription for clobetasol propionate solution in a little dropper, which i'm supposed to use for more intense outbreaks that might happen. luckily, so far, i have been fine just cycling shampoos! recommend giving this a shot :)