anybody good at maths...

mariaw

Registered User.
Local time
Today, 20:48
Joined
Jun 9, 2006
Messages
88
Hi

I have a questionnaire that I have to analyse, where people answer Yes or No to a question.

In my report, I have the following (to show how many people answered "yes"):

sum(Iif[q43]="yes",1,0))/Count([ID]) - this produces 25% (which is correct).

What I want to do now is, for q44, out of the people that answered "yes" to q43 (so 25%). how many of them answered "yes" to Q44....

The answer should be 100%.

So the report would look like this

Q43: yes: 25% No: 75%
q44: yes: 100% (where people answered "yes" to q43)

Hope this makes some sense ...can anyone work out a formula???

Thanks

Maria
 
Close...that gives me 200%? it needs to be 100%?
Thanks
 
So, that means that some people who answered "Yes" to question 44 did not do so for question 43.
 
Yes that's right; some people said "no" to question 43, but "yes" to q44.... it just gets better and better...!
 
have you got it yet

in macrocode it will be something like

count(q43=true AND q44=true) /count(q43=true)

ie return true on the left side iff they answered true to BOTH Q43 and Q44.
 
Hello

I put this in:

Count([Q43]="yes" And [Q44]="yes"/Count([q43]="yes")) (because the answers are "yes" rather than true

but its says that I "cannot have an aggregate function in the expression"???

Any idea what else I can do :)

Thanks

Maria
 
you have count embedded in the first count

try this (different bracketing)

Count([Q43]="yes" And [Q44]="yes")/Count([q43]="yes")


but i think the counts need structuring differently , as there are no domains specified - my original was just a logic i thought should work
 
Hi Gemma

This works better, but it doesn't seem to like it if q44 is blank? It counts the blank as a "yes"?

Maria
 
probably need to cast the blanks as no's then, with nz, although

Count( nz([Q43],"No") ="yes" And nz([Q44],"No") = "yes")/Count(nz([q43],"No" )="yes")
 

Users who are viewing this thread

Back
Top Bottom