Canonical correspondence analyses (CCA) of the beetle communities found in the polypore fungi Fomes fomentarius (L. ex Fr.) Kickx and Piptoporus betulinus (Bull. ex Fr.) Karst. from five localities in western Norway was applied to quantify the relative importance of various environmental variables. A total of 2266 adult specimens were identified to 57 species. Ecological qualities of different forest types were more important than qualities of the sporophores per se. The two polypore species have different communities of beetles, which can be explained by different habitat qualities offered by the two species. For F. fomentarius, the most explanatory variable turned out to be whether the sporophore was dead or alive. The sporophore's weight at sampling time was the most explanatory variable for the beetles inhabiting P. betulinus.