you need a second query to calculate the total - we'll call it qryTTL
Code:
SELECT Count(TableMonth.[IncidentID]) AS Ttl
FROM TableMonth
WHERE (((TableMonth.Provider)="CANTV" Or (TableMonth.Provider)="MOVISTAR");
which will return a single value
then you need a third to combine the two to do the calculation. Assume your first query is called qry1
Code:
SELECT Provider, Amount, Amount/Ttl as pcent
FROM qr1, qryTTL
Note your first query, although works is inefficient because you are apply the criteria after you have summarised all the data. You are also grouping by Type (which is a reserved word and should not be used for a field name) which I don't believe you intended. HAVING should only be applied to columns which has been summed, counted, whatever. e.g. HAVING Count(IncidentID)>10
It should be
Code:
SELECT TableMonth.Provider, Count(TableMonth.[IncidentID]) AS Amount
FROM TableMonth
WHERE (((TableMonth.Provider)="CANTV" Or (TableMonth.Provider)="MOVISTAR") AND ((TableMonth.[Type])="Total"));
GROUP BY TableMonth.Provider