I didn't quite follow the logic, but you should be able to get what you need by adding a PARTITION BY clause (see in red).SELECT
[Year],[Qtr],Reason,
COUNT(*) AS RsnCt,
100.0*COUNT(*)/SUM(COUNT(*)) OVER(PARTITION BY [Year],[Qtr]) AS [% of Total (rsnct/qtrTotal)]
FROM
Tbl
GROUP BY
[Year],[Qtr],Reason
If that does not give you what you are looking for change the partition columns to Year,Reason or some other combination.