• You need to replace your COUNTIF with a COUNT(CASE .... WHEN ...) 

    For example,  COUNT(CASE WHEN [Sub Product Line] LIKE '%HMO' THEN 1 ELSE NULL END).

    While the ELSE clause is optional here, I'm including it to emphasize that you want to return NULL for anything that you don't want to count.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA