Countiif Function with Multiple Criteria (1 Viewer)

JithuAccess

Member
Local time
Yesterday, 23:10
Joined
Mar 3, 2020
Messages
297
Hello Guys,

In my Report I want to show the Total count based on multiple criteria. I have put the following Function in the Control Source property of a Text Box:

=Count(IIf([strCountry]="USA",1) And ([strState]="CA",1) And ([StrCity]="Los Angeles",1))

But I am getting an Error

Could you please let me know how to fix this.

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 22:10
Joined
Oct 29, 2018
Messages
21,358
I would use Sum() instead. For example:
Code:
=Sum(IIf([strCountry]="USA" AND [strState]="CA" AND [strCity]="Los Angeles",1,0))
Hope that helps...
 

JithuAccess

Member
Local time
Yesterday, 23:10
Joined
Mar 3, 2020
Messages
297
I would use Sum() instead. For example:
Code:
=Sum(IIf([strCountry]="USA" AND [strState]="CA" AND [strCity]="Los Angeles",1,0))
Hope that helps...

Thanks a lot. It works Perfect
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:10
Joined
Feb 19, 2002
Messages
42,981
I guess I wasted my time answering your other question:


Please don't post the same question twice.
 

Users who are viewing this thread

Top Bottom