G
Guest
Hello, I have the followinq query that counts the AHT Value if the value is
<= the target. That seems to work fine, however, I need the query to return a
zero value where there are no values that meet the target. how do i do this?
At the moment, if the count equals zero the field is left out.
SELECT
AvgAht.Supervisor,
AvgAht.Date,
AvgAht.Region,
AvgAht.JobTitle,
Count([AvgAht.Aht]) AS AHTCount
FROM AvgAht INNER JOIN Targets ON AvgAht.JobTitle = Targets.ServiceArea
WHERE
(((Format([AvgAht].[Date],"yyyymm"))=Format([Targets].[Date],"yyyymm")) AND
((AvgAht.Aht)<=[TArgets].[AhtTArget]))
GROUP BY AvgAht.Supervisor, AvgAht.Date, AvgAht.Region, AvgAht.JobTitle,
Targets.AHTTarget
HAVING (((AvgAht.Supervisor) Like "*" & [forms]![CCEfficiency]![Supervisor])
AND ((AvgAht.Date) Like "*" & [Forms]![CCEfficiency]![Date]) AND
((AvgAht.Region) Like "*" & [Forms]![CCEfficiency]![Region]) AND
((AvgAht.JobTitle) Like "*" & [forms]![CCEfficiency]![Combo12]));
<= the target. That seems to work fine, however, I need the query to return a
zero value where there are no values that meet the target. how do i do this?
At the moment, if the count equals zero the field is left out.
SELECT
AvgAht.Supervisor,
AvgAht.Date,
AvgAht.Region,
AvgAht.JobTitle,
Count([AvgAht.Aht]) AS AHTCount
FROM AvgAht INNER JOIN Targets ON AvgAht.JobTitle = Targets.ServiceArea
WHERE
(((Format([AvgAht].[Date],"yyyymm"))=Format([Targets].[Date],"yyyymm")) AND
((AvgAht.Aht)<=[TArgets].[AhtTArget]))
GROUP BY AvgAht.Supervisor, AvgAht.Date, AvgAht.Region, AvgAht.JobTitle,
Targets.AHTTarget
HAVING (((AvgAht.Supervisor) Like "*" & [forms]![CCEfficiency]![Supervisor])
AND ((AvgAht.Date) Like "*" & [Forms]![CCEfficiency]![Date]) AND
((AvgAht.Region) Like "*" & [Forms]![CCEfficiency]![Region]) AND
((AvgAht.JobTitle) Like "*" & [forms]![CCEfficiency]![Combo12]));