Count Per Month

G

Guest

I'm trying to count how many Cases per month per Reviewer.

My Query has a value called months:
Months: IIf([IssueCloseDate] Is
Null,Null,MonthName(Month([IssueCloseDate]),True))

In my report I want to show a count ie: Jan=2, Feb=19, Mar=7.....

I Sorted/Grouped the report by Reviewer.

I'm trying to put one text box for Jan, another for Feb, etc...

This code is not giving me a total - what am I doing wrong??????

=Sum(IIf([Months]=Jan))
or
=Sum(IIf([Months])="Jan"))

Thanks
 
G

Guest

Use a totals query:

Format([IssueCloseDate],"mmm") - Group By

[Issue] - Count

[Reviewer] - Group By
 
G

Guest

Everything in the below code works EXCEPT the last line - where I'm adding a
date range. I have to allow the use to enter a date range.

Since the code uses MONTH to calculate the count, how can I allo the user to
enter ie: 01/01/2006 - 5/5/2006????????

SELECT Count(tblQualityData.ICNNo) AS CountOfICNNo, tblQualityData.Reviewer,
IIf([IssueCloseDate] Is Null,Null,MonthName(Month([IssueCloseDate]),True)) AS
Months, tblQualityData.IssueCloseDate
FROM tblQualityData
GROUP BY tblQualityData.Reviewer, IIf([IssueCloseDate] Is
Null,Null,MonthName(Month([IssueCloseDate]),True)),
tblQualityData.IssueCloseDate
HAVING (((tblQualityData.IssueCloseDate) Between
[forms]![f_KeyIndicators].[txtstart] And [forms]![f_KeyIndicators].[txtend]));





Jeff C said:
Use a totals query:

Format([IssueCloseDate],"mmm") - Group By

[Issue] - Count

[Reviewer] - Group By
--
Jeff C
Live Well .. Be Happy In All You Do


Dan @BCBS said:
I'm trying to count how many Cases per month per Reviewer.

My Query has a value called months:
Months: IIf([IssueCloseDate] Is
Null,Null,MonthName(Month([IssueCloseDate]),True))

In my report I want to show a count ie: Jan=2, Feb=19, Mar=7.....

I Sorted/Grouped the report by Reviewer.

I'm trying to put one text box for Jan, another for Feb, etc...

This code is not giving me a total - what am I doing wrong??????

=Sum(IIf([Months]=Jan))
or
=Sum(IIf([Months])="Jan"))

Thanks
 
G

Guest

Build your date range criteria into a source query for your totals query
--
Jeff C
Live Well .. Be Happy In All You Do


Dan @BCBS said:
Everything in the below code works EXCEPT the last line - where I'm adding a
date range. I have to allow the use to enter a date range.

Since the code uses MONTH to calculate the count, how can I allo the user to
enter ie: 01/01/2006 - 5/5/2006????????

SELECT Count(tblQualityData.ICNNo) AS CountOfICNNo, tblQualityData.Reviewer,
IIf([IssueCloseDate] Is Null,Null,MonthName(Month([IssueCloseDate]),True)) AS
Months, tblQualityData.IssueCloseDate
FROM tblQualityData
GROUP BY tblQualityData.Reviewer, IIf([IssueCloseDate] Is
Null,Null,MonthName(Month([IssueCloseDate]),True)),
tblQualityData.IssueCloseDate
HAVING (((tblQualityData.IssueCloseDate) Between
[forms]![f_KeyIndicators].[txtstart] And [forms]![f_KeyIndicators].[txtend]));





Jeff C said:
Use a totals query:

Format([IssueCloseDate],"mmm") - Group By

[Issue] - Count

[Reviewer] - Group By
--
Jeff C
Live Well .. Be Happy In All You Do


Dan @BCBS said:
I'm trying to count how many Cases per month per Reviewer.

My Query has a value called months:
Months: IIf([IssueCloseDate] Is
Null,Null,MonthName(Month([IssueCloseDate]),True))

In my report I want to show a count ie: Jan=2, Feb=19, Mar=7.....

I Sorted/Grouped the report by Reviewer.

I'm trying to put one text box for Jan, another for Feb, etc...

This code is not giving me a total - what am I doing wrong??????

=Sum(IIf([Months]=Jan))
or
=Sum(IIf([Months])="Jan"))

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Split By Month 2
Months 6
Multi-month data strategy 2
Need help with SQL Statement in MS Access 2003 Chart 11
Access Count dates within a Month 4
Include months w/no data 7
Reports not running out of Design 1
Sort Report by Month 1

Top