How count without duplicates in higher group by sepcial condition?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

group number:1 group status:yes
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:2 group status:no
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:3 group status:no
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:4 group status:yes
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4

I just want to count the group by status is "yes"
but all group link by detail number,
so it always count duplicate,

how to solve this problem, thanks.
 
chenr said:
group number:1 group status:yes
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:2 group status:no
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:3 group status:no
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4
group number:4 group status:yes
detail number:xxxx1
detail number:xxxx2
detail number:xxxx3
detail number:xxxx4

I just want to count the group by status is "yes"
but all group link by detail number,
so it always count duplicate,


Create a text box named txtGrpsYes in the group header
section. Set its RunningSum property to Over All and
(assuming a status Yes is really a True) set its control
source expression to:

=IIf([statusfield], 1, 0)

Then a report footer text box can display the number of
groups with true status by using the expression:

=txtGrpsYes
 
Back
Top