Hi,
I have a query with different columns. One is column animal.
I have two types of values in animal column; "Cat" and "Dog"
Is i possible to create a total query which sums all the cats and excludes the dogs.
Br Bertrand
Hi,
I have a query with different columns. One is column animal.
I have two types of values in animal column; "Cat" and "Dog"
Is i possible to create a total query which sums all the cats and excludes the dogs.
Br Bertrand
Create an additional Column
myCats:iif(animal= "Cat",1,0)
And the sum all the values from mycats?
You said you were using a Totals query. That will give you a Sum.
There are different approaches depending on your needs.
You could use a DCount as an alternative.
What do you want to do with this information. A Totals query is not updateable so maybe this is not for you.
If you simply want to display the result on a Form or Report then DCount may be better for you.
So it is back to you to say what you need other than just a number.
Ok, for now this is totally enough. thanks for assitance.
OK
I feel like I have done little but if you are happy then fine.