I thought this would be easy but all the count functions, and IIF etc, seem to count all the records per group. I need to count only once per group.
here's the recs being fed to report from a query, note the 'USE CODE Y/N' will always be same for each rec for a given ID. I'm using a group by ID, so I list all the codes per group ID and NAME, in the detail section
I can get all the counts of codes, codes per ID, etc but need to get a count
ID NAME CODE USE CODE Y/N 1a name 1 a y 1a name 1 b y 1a name 1 c y 1b name 2 d n 1b name 2 e n 1b name 2 f n 1c name 3 g y 1c name 3 h y 1c name 3 i y 1d name 4 j n 1d name 4 j n
of how many ID's use codes vs not using codes
so for this group of recs it would be:
Total ID's using Codes = 2
Total ID's not using Codes = 2
I've been looking for something like to identify the first or last rec of a group, that would enable me to do a SUM based on the 'USE CODE Y/N' value with a SUM(IFF..
but can't seem to find the way to do this