blindlemonray
Technical User
I have a slight problem with a query design. I am trying to count the number of items in a field when several criteria are met. Two fields I need to count are branch and refer. the criteria is :- Branch (is not null) and Refer (is not Null). But what i need is both of the above but on a YTD and between two dates so i end up with
Branch
Count of Branch
Count of Refer
I have been trying something like
But obviously all i get is same count for branch and refer!
Any pointers appreciated?
![[morning] [morning] [morning]](/data/assets/smilies/morning.gif)
Branch
Count of Branch
Count of Refer
I have been trying something like
Code:
SELECT tblOS_Data.txt_Branch, Count(tblOS_Data.txt_Branch) AS CountOftxt_Branch, Count(tblOS_Data.chk_referred) AS CountOfchk_referred
FROM tblOS_Data
WHERE (((tblOS_Data.txt_Branch) Is Not Null))
GROUP BY tblOS_Data.txt_Branch;
Any pointers appreciated?
![[morning] [morning] [morning]](/data/assets/smilies/morning.gif)