I will try to explain what probably is going on. I have a similiar issue when doing distinct counts and groups (the group totals do not match the grand total).
If whatever field you are doing a distinct count on has two (or more) records that meet the criteria for two (or more) groups, it will be counted once in each group, thus throwing the grand total off.
Example. Distinct count of patient_Id, group by insurance carrier. Patient has two insurance carriers. It gets counted once for each carrier (twice counted), but counted once for the grand total.
I hope this helps.