Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Crosstab used i...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 30592 of 31576
Post > Topic >>

Crosstab used in Graphing Incidents per Day and per Week for a Month

by 6afraidbecause789@[EMAIL PROTECTED] Jun 26, 2008 at 02:03 PM

Hi =96 Similar to a re****t that contains a graph that plots the total
number of incidents per month, I=92d like to make a graph that plots the
total number of student incidents per day but also per week in a
month.  The crosstabs below do the basic grouping of incidents in
months and on weekdays, but users need to see, in a graph, M, T, W, R,
and F of the first week, M, T, W, R, and F of the second week, M, T,
W, R, and F of the third week, M, T, W, R, and F of the fourth week,
and any remaining days in a fifth week in a month.  Better yet, it
would be good if the re****t=92s graph only graphed daily results up to
the current day=97instead of showing future days with null records.  Is
this possible??

The "IncidentDateTime" field is a date/time stamp with the General
date format; including minutes.

=91Crosstab to total incidents per month=85
TRANSFORM Count(qryRe****tAll.IncidentID) AS CountOfIncidentID
SELECT qryRe****tAll.StudentID, IIf(IsNull([OName]),[LName] & ", " &
Left([FName],1) & ".",[LName] & ", " & Left([OName],1) & ".") AS
ExpCombinedName, Count(qryRe****tAll.IncidentID) AS [Total Of
IncidentID]
FROM qryRe****tAll
GROUP BY qryRe****tAll.StudentID, qryRe****tAll.LName,
qryRe****tAll.FName, qryRe****tAll.OName, IIf(IsNull([OName]),[LName] &
", " & Left([FName],1) & ".",[LName] & ", " & Left([OName],1) & ".")
PIVOT Format([IncidentDateTime],"mmm") In
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");

=91Crosstab to total incidents per day=85
TRANSFORM Count(qryRe****tAll.IncidentID) AS CountOfIncidentID
SELECT qryRe****tAll.StudentID, IIf(IsNull([OName]),[LName] & ", " &
Left([FName],1) & ".",[LName] & ", " & Left([OName],1) & ".") AS
ExpCombinedName, Count(qryRe****tAll.IncidentID) AS [Total Of
IncidentID]
FROM qryRe****tAll
GROUP BY qryRe****tAll.StudentID, qryRe****tAll.LName,
qryRe****tAll.FName, qryRe****tAll.OName, IIf(IsNull([OName]),[LName] &
", " & Left([FName],1) & ".",[LName] & ", " & Left([OName],1) & ".")
PIVOT Format([IncidentDateTime],"dddd") In
('Monday','Tuesday','Wednesday','Thursday','Friday');

Hope this makes sense.  Thanks for any insight.
 




 4 Posts in Topic:
Crosstab used in Graphing Incidents per Day and per Week for a M
6afraidbecause789@[EMAIL   2008-06-26 14:03:43 
Re: Crosstab used in Graphing Incidents per Day and per Week for
Kelii <keliie@[EMAIL P  2008-06-26 20:26:57 
Re: Crosstab used in Graphing Incidents per Day and per Week for
6afraidbecause789@[EMAIL   2008-06-30 04:35:11 
Re: Crosstab used in Graphing Incidents per Day and per Week for
Kelii <keliie@[EMAIL P  2008-06-30 19:52:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 23:26:39 CST 2008.