cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
AM
AM
Level I

How to assign a number for a repeated measurement

Hi,

I have a dt with measurements of vital signs repeated three times at a visit for each subject.:

Subjects Vital SignsResultvisitRepetition
1Dias601a
1Dias651b
1Dias621c
1Sys 1221a
1Sys 1201b
1Sys 1251c
1Pul721a
1Pul741b
1Pul771c
2Dias651a
...................

 

I would like to write a formula that calculates repetitions for vital signs measurements in a new column (e.g. repetition a, b, c). What would be the best way to assign those values?

Thank you in advance forhelp.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to assign a number for a repeated measurement

If making the Repetition a numeric value is an option, then you could simply create the new column, and then go to Col Info, and under "Initialize Data" select "Sequence Data" and then specify a sequence of 1 to 3

repetiition1.PNG 

Or you could create the formula

theList = {"a", "b", "c"};
If( Mod( Row(), 3 ) > 0,
	theList[Mod( Row(), 3 )],
	theList[3]
);

Make sure the column is defined as a Character column to use the above formula

Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: How to assign a number for a repeated measurement

If making the Repetition a numeric value is an option, then you could simply create the new column, and then go to Col Info, and under "Initialize Data" select "Sequence Data" and then specify a sequence of 1 to 3

repetiition1.PNG 

Or you could create the formula

theList = {"a", "b", "c"};
If( Mod( Row(), 3 ) > 0,
	theList[Mod( Row(), 3 )],
	theList[3]
);

Make sure the column is defined as a Character column to use the above formula

Jim
AM
AM
Level I

Re: How to assign a number for a repeated measurement

Thank you! It works perfectly. Have a nice day.

ron_horne
Super User (Alumni)

Re: How to assign a number for a repeated measurement

hi @AM ,

@txnelson gave a good clean solution for your question. But if your data is actually more complicated have a look at the following

https://community.jmp.com/t5/Discussions/Syntax-How-do-I-create-an-index-column-by-ID/m-p/9751/highl...

it does the same but in a more robust way managing messy data sets.

 

 

Recommended Articles