Count from groups on a report

G

Guest

Hi all

I have a YTD report which is grouped by country, then by specialist and then
activity (it is based on a crosstab query which has a date range criteria to
get a specific year). I want a count for each country for the number of
specialists. If I use count([Specialist]) I get the number of activity rows
per country which isn't what I want. I also tried:

=DCount("[Specialist]","qry Resource Allocation
Prod","[CountryCode]=txtCountry")

but got the same result as Count([Specialist]). I want it to just count one
occurrence of Specialist per country - is this possible?

Thanks in advance for any help.
Sue
 
G

Guest

Found a solution thanks...

Put =1 in an unbound text field and set its running sum to over group then
referenced the name of this control in another control in the footer to be
able to use in calculations
 
G

Guest

mmm this worked fine until I tried to use the value in further calculations.
I added another unbound text control with control source of
=target*totalSpecCount and this made the totalSpecCount field to always
display 1 and not the running sum total of the group?

Anyone know a better way of achieving this?

Thanks

hughess7 said:
Found a solution thanks...

Put =1 in an unbound text field and set its running sum to over group then
referenced the name of this control in another control in the footer to be
able to use in calculations

hughess7 said:
Hi all

I have a YTD report which is grouped by country, then by specialist and then
activity (it is based on a crosstab query which has a date range criteria to
get a specific year). I want a count for each country for the number of
specialists. If I use count([Specialist]) I get the number of activity rows
per country which isn't what I want. I also tried:

=DCount("[Specialist]","qry Resource Allocation
Prod","[CountryCode]=txtCountry")

but got the same result as Count([Specialist]). I want it to just count one
occurrence of Specialist per country - is this possible?

Thanks in advance for any help.
Sue
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Sum of Types in Group 1
Creating data via code 12
Selecting data 2
Design and layout for Order Analysis? 5
Report Group Count Woes 6
Running YTD totals 2
Report criteria 3
Distinct Count in Crosstab 1

Top