Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Count from 1 field

Status
Not open for further replies.

markj11

Programmer
Mar 24, 2006
11
US
I have a table column that could have either "a" or "b". How do I get a count of how many "a"'s? I know I am just overlooking something very obvious.
Thanks
 
You could use Sum() instead of Count() like this:[tt]
=Sum(iif(Fields!MyLetter.Value = "a",1,0))[/tt]
 
That doesn't seem to work. I have 3 a's and 2 b's and my =Sum(iif(Fields!MyLetter.Value = "a",1,0)) & =Sum(iif(Fields!MyLetter.Value = "b",1,0)) both return 0.
Thanks
 
This is working, I had to RTRIM() the value.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top