How would I group by month if I have a set of dates in the individual fields? Essentially I have data that I want to group by month in the "dates" column and then perform sum of expenses in the "expenses" column. I know it's a very simple question.
Last edited by eonizuka; 12-17-2009 at 08:22 PM.
Hi eonizuka,
Group By this as a Calculated Field in the query:
you may also want to use this to give it a chronological sort:Code:SumMonth: Year([Dates]) & " " & MonthName(Month([Dates]))
you won't need to display the sort.Code:SumMonthSort: Year([Dates]) & " " & Month([Dates])
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Hi ConnexionLost,
Thank you for your help with this. In which row of the query should the expression "Year([Dates]) & " " & MonthName(Month([Dates]))" be input? Is it in the criteria row? I have a bunch of dates in a field named "contractdate". Yes, I'm very much an Access beginner, thanks for your patience.
Hi eonizuka,
Happy to help.
Put the SumMonth in as a new/empty column in the Field row. Use it in place of your "contractdate" with the "Group By" in the Totals row.
Cheers,Code:SumMonth: Year([contractdate]) & " " & MonthName(Month([contractdate]))
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Excellent. Thank you very much for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks