cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Countif equivalent?

I am trying to find a JMP formula function equivalent to Excel’s Countif function, that points to a column and returns the number of rows that are the same as the value in the current row, as you would get if you did a Summary on that row.

 

In other words, if I have a 1000-line table, and column Color is set to "Purple" in 27 rows, I want a formula for a new row that returns 27 for those rows (and the applicable value for the other rows)

 

(I’m sure this is in here, but **bleep** if I can find it)

 

JMP 17, macOS

10 REPLIES 10
Craige_Hales
Super User

Re: Countif equivalent?

Close, I think. I was never in that C++ code, but I believe on the very first call (typically for row 1) it preprocesses all the rows to cache all the possible by-value answers. Then all subsequent rows are answered from that by-value cache. (Without the cache it would be an order(N^2) time for N rows, with the cache just order(N) - linear time.)

 

Craige