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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

More Counting Formula Fields

Status
Not open for further replies.

Skob

Technical User
Jul 4, 2003
6
GB
Hi

Similar to thread149-593903, I am trying to get conditional counts on a formula field. The difference is that my conditional field is text not numeric, i.e. I want to return certain text strings and not others. Any suggestions as to method and syntax? If Then Else doesn't seem to work.

I have tried using SELECT ... FROM ... WHERE ... , but I can't seem to get the syntax right?

Thanks in advance.
 
Don't be bashful, share what is in the formula field and what it is you'd like to count.

You can probably use a Running Total and in the Evaluate->Use a Formula accomplish whatever it is you're trying to do.

-k
 
You might try a formula like this in the details section:

if {Customer.Customer Name} in ["Psycho-Cycle","Pathfinders", "CityCyclists"] then 1 else 0

Then just insert a summary on the formula, using distinctcount if you have duplicate values.

If your criteria are more complex, you might need to use running totals as SV suggested.

-LB
 
Many thanks SV and LB you were both right and I've cracked it now. Had to use

if {Customer.Customer Name} = "string"
or {Customer.Customer Name} = "string"
or ...
then 1 else 0

and then sum the total in a running total field.

But I still can't understand why using Count on an If Then Else function in a running total field didn't work !!!

Skob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top