Define a calculated field like this:
That will return a value of 1 for every row where the condition is true and 0 for all the others. Then simply add SUM([Your calc field]) to you view.
Thank you for the solution, but I am working on the same problem with state data. It is VERY tedious to type IIF([state] = "CA",1,0)
IIF([state] = "WA",1,0)
IIF([state] = "OR",1,0)
IIF([state] = "DC",1,0)
In fact it is prohibitively tedious. In excel, let's assume A1 = "CA", I can simply say =COUNTIF(A:A,A1), drag down, and I will have the count of each state present.
Can you please let me know how you achieved this. i need to replicate the same and struggling to get it.