troubledesire
New member
- Local time
- Today, 01:58
- Joined
- Apr 27, 2010
- Messages
- 2
Hi all,
I have a database that tracks the number of visits to a museum--each time someone visits I add an entry to tblVisit with the User's ID and a Date/timestamp. Now I want to calculate the average number of visitors by the day of the week. I can calculate total number of visits by day easily, using a Group By for the day of the week:
DayOfWeek: Format([VisitDatetime],"ddd")
This plus a Count in my query yields summaries:
Monday 314
Tuesday 400
Wed 323
and so on. But I want the AVERAGE number of visitors by each week day, which means I need to know how many (different) Mondays were counted, how many Tuesdays, etc. So if the above figure included 10 dates which were Mondays, my average number of visitors for a Monday would be 31.4.
Any ideas how I would do that?
Many thanks in advance for any help!
I have a database that tracks the number of visits to a museum--each time someone visits I add an entry to tblVisit with the User's ID and a Date/timestamp. Now I want to calculate the average number of visitors by the day of the week. I can calculate total number of visits by day easily, using a Group By for the day of the week:
DayOfWeek: Format([VisitDatetime],"ddd")
This plus a Count in my query yields summaries:
Monday 314
Tuesday 400
Wed 323
and so on. But I want the AVERAGE number of visitors by each week day, which means I need to know how many (different) Mondays were counted, how many Tuesdays, etc. So if the above figure included 10 dates which were Mondays, my average number of visitors for a Monday would be 31.4.
Any ideas how I would do that?
Many thanks in advance for any help!