Need help with a multi-column per date graph

A

Alejandro

I'm trying to generate a report that will indicate number of admissions
processed by an associate per day. In my mind this was very simple: a form
would request the user to select a hospital from a combo box, enter the start
date and the end date in two textboxes, and click on the "generate graph"
button whose only code line would be to open the report. In the report the
data source would be count on patient ID group by date and by associate,
where date between the values of the startdate and enddate text boxes and
hospital equal to the value of the hospital combobox.

The idea was to see a column graph with dates as the X axis and
count(patient ID) in the y axis, and on each date on column per associate.
This is the code I have for the graph in the report:

SELECT tbl_DataWithoutCalculatedTimes.Date,
tbl_DataWithoutCalculatedTimes.[ADM REP],
Count(tbl_DataWithoutCalculatedTimes.[PATIENT ID]) AS [CountOfPATIENT ID]

FROM tbl_DataWithoutCalculatedTimes

WHERE (((tbl_DataWithoutCalculatedTimes.Date) Between
([Forms]![frm_Analysis_ByPeriodByAssociate]![txt_StartDate])
And ([Forms]![frm_Analysis_ByPeriodByAssociate]![txt_EndDate]))
AND ((tbl_DataWithoutCalculatedTimes.DEPARTMENT)="Front Desk")
AND
((tbl_DataWithoutCalculatedTimes.HOSPITAL)=[Forms]![frm_Analysis_ByPeriodByAssociate]![cmb_Hospitals]))

GROUP BY tbl_DataWithoutCalculatedTimes.Date,
tbl_DataWithoutCalculatedTimes.[ADM REP]

ORDER BY tbl_DataWithoutCalculatedTimes.Date;

I'm getting a graph with a single column per date so I can't distinguish the
values per associate. Any help will be greatly appreciated.

Thanks.

A.
 

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

Top