Count based on an expression

Mark.Innes

Registered User.
Local time
Today, 01:54
Joined
Dec 10, 2003
Messages
15
Hi,

I have a query that performs a number of counts and then produces an expression that is a % of 2 other sum fields.

What I am struggling to do is perform a count of the number of records in the expression that are <5

Any ideas please?
 
CountLessThan5: sum(iif(YourField<5;1;0))

That should do the trick
 
I must be doing something wrong, sorry if this sounds stupid but
I placed the "yourfield" with the field name of the expressions i.e. expr1 and now do I enter this in a new field or in the criteria of the expression?

I tried both but got an error "The expression entered contains an invalid syntax

Help
 
You cant be counting on the same line as your calculating....

Post a sample of your db so i can have a looksee and i will be able to give a better answer.

Regards
 

Users who are viewing this thread

Back
Top Bottom