JSL scriptingI would like to add a group column based on the range value of another column. The max of item in the same group is 15. Sample data attached
ScriptingRe: JSL scriptingI'm afraid I don't understand how you want to assign this new grouping column. Can you be more specific and provide some example values?
Also, it would be easier to help you if you attach a JMP data table instead of an Excel file.
Re: JSL scriptingHello!
I do not understand your question either (as @Jeff_Perkinson)... is it that want to divide your data into groups with a maximum of 15 participants ... and than have the data rows flagged with an indicator for that? If so, does the continuous indicator in your data matter or just the row number (i.e. can we assume the data to be sorted)?
Regards
fja
Re: JSL scriptingHi Jeff,
Thanks for take a look to my asking.
I re-attaches 2 table, 1 for original and the final is the one I want to be in jmp.
From the final one, I want to add a new column (group) based on the value from price column.
The price can be variation by sell item but if they are closed each other then I want them in the same group.
Re: JSL scriptingHi fja,
Thanks for take a look to my asking.
I re-attaches 2 table, 1 for original and the final is the one I want to be in jmp.
From the final one, I want to add a new column (group) based on the value from price column.
The price can be variation by sell item but if they are closed each other then I want them in the same group.
Re: JSL scriptingThanks, @VD, that helps but it does lead to the next question, what rule is applied to say that the first six rows go to one group (i.e. "sell-1"), then the next six to another group, and so forth.
What is it that defines the groups?
Re: JSL scriptingIf manual grouping is OK for you, you can use:
Right-Click on the price column/New Formula column/Distributional/Custom binning ...


Group 4 and 5 look quite the same. Possible to combine them in one group?
And perhaps split group 3?

Re: JSL scriptinghi Jeff, the group define by the price column. The price is always difference by line item but if they have the same range then in the same group.
I want to be in script so i can use on difference data table with difference price.
Thanks,
Re: JSL scriptingHow large a difference between the price from one row to the next would make it a different group? 1000? 100?
You also only want 15 rows in one group, so if the price doesn't exceed the difference asked about above but there have already been 15 rows in th group then you want a new group. Is that correct?