- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
JMP equivalent of Excel's COUNTIF function
I'm trying to mimic this Excel-type behavior:
A | B | |
1 | failureType | numFailuresThisType |
2 | f1 | =countif($a$2:$a$999,a2) |
3 | f2 | =countif($a$2:$a$999,a3) |
4 | f1 | =countif($a$2:$a$999,a4) |
5 | f1 | =countif($a$2:$a$999,a5) |
6 | f2 | =countif($a$2:$a$999,a6) |
... | ... | ... |
... in JMP. Is this possible as a column formula?
I've tried "Col Sum( :failureType == :failureType[ Row() ] )" but that doesn't work and I don't understand why. Sometimes ":ColumnName" returns a single value, and other times it returns the entire column's-worth of entries and auto-loops over them. Is there a way to tell which it will do, perhaps from the Scripting Index?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP equivalent of Excel's COUNTIF function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP equivalent of Excel's COUNTIF function
Sure, open up BigClass.jmp and add a column with this formula:
Col Sum( :height * :weight, :sex )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP equivalent of Excel's COUNTIF function
Even though it looks like it does work, I wouldn't use it (I think it should be fine if it required you to have :failureType as byvar). I would think that it is some sort of unintended behavior (even more than using 1 which shouldn't be allowed either according to JMP support, but let us hope that JMP never breaks that
Make using formula expressions in Set Each Value and using expressions as first argument in Col stat... ).
You could report it to JMP Support and try to see if they can give technical explanation about why it works like it does. You can also try using other comparisons in similar manner
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP equivalent of Excel's COUNTIF function
Other option is Col Number()
Col Number(:FailureType, :FailureType)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: JMP equivalent of Excel's COUNTIF function
These replies directly answered your question about a function that works like Excel. You can also use Table > Summary, Analyze > Tabulate, and Graph > Graph Builder for summaries without using a formula column if that is where you are headed.
- « Previous
-
- 1
- 2
- Next »