I'm trying to sort an existing categorising query to categorise by financial years. I've managed that, but it won't re-categorise once the extra calculation fields are added. Any ideas?
Expand|Select|Wrap|Line Numbers
- SELECT [CM Database].[Age Range],
- Count([CM Database].[Age Range]) AS [Count],
- Year([Date Contacted])-IIf([Date Contacted]<DateSerial(Year([Date Contacted]),4,1),1,0) AS FinYr,
- [FinYr] & "/" & Right(([FinYr]+1),2) AS [Financial Year]
- FROM [CM Database]
- GROUP BY [CM Database].[Age Range],
- Year([Date Contacted])-IIf([Date Contacted]<DateSerial(Year([Date Contacted]),4,1),1,0),
- [FinYr] & "/" & Right(([FinYr]+1),2)
- HAVING ((([CM Database].[Age Range]) Is Not Null)
- AND ((Year([Date Contacted])-IIf([Date Contacted]<DateSerial(Year([Date Contacted]),4,1),1,0))=[Year]))
- ORDER BY [CM Database].[Age Range];