JMP formula : Rank by group<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />JMP formula : Rank by group
Hi there~ ^^
Could you do me a favor?
-1. I want to use "Rank by Group"
-.I use JMP ver 9.02
I can use JMP function "Col Rank(:height) "
but I cannot use this by groupping "Col Rank(:height, :Group )" Cannot typing this ":Group"
-2. How can I ranking up-to-down or down-to-up(default) by height?

Re: JMP formula : Rank by groupwill this work for creaking the col rank by descending order too?
Re: JMP formula : Rank by groupI was trying to solve this same problem and created a script that I could attach to my toolbar. Since there wasn't a single formula that can be easily applied, this script will manually assign the proper ranking to the current data table after it prompts the user for the relevant columns. Feel free to use or adapt if desired.
dt1 = Current Data Table();
nw = New Window( "Select Columns",
<<MODAL></MODAL>
Re: JMP formula : Rank by groupWendy Murphrey,
I appreciate you taking the time to answer my questions!
and I'm happy to receive this answer from the author of 'Jump into JMP Scripting' book.
It was really helpful to understand JSL for begineer like me ^^
I hope you have a great day!
Re: JMP formula : Rank by groupHello,
As you have seen, there is currently no By option for Col Rank. To accomplish the same thing, do the following:
1. Add a column to store the original row order. If you choose to use a formula with the Row() function, be sure to remove the formula after the values are stored in the column.
2. Sort the table by height within Group. You can choose to do this ascending or descending.
3. Add a formula to the Rank Height by Group column that will assign a count which represents the rank within each group:
If(Row() == 1, 1, If(:Group[Row()] == :Group[Row() - 1], :Rank Height by Group[Row() - 1] + 1, 1))
4. Sort the table by the original row order column.
I hope this is helpful!
Wendy Murphrey