cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • Use JMP Clinical with CDISC-compliant data. Review studies, ID safety and efficacy signals & communicate findings with interactive graphics. Register to see how. Aug. 27, 2 pm US ET.

Discussions

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

Copying Row values to other Column

Hello,

 

Kindly help me I'm stuck when putting a formula into other column.

Here is expected output if SerialNumber is not empty copy row to Column ChipID else copy the same SN.

Capture.PNGCapture.PNG

dtraw << New Column("ChipID", Character, Formula(
For( i = 1, i <= N Rows(dtraw), i++,
	If( Is Missing( :SerialNumber),
		:ChipID[i] = (:SerialNumber[1] & i = 1),
		:SerialNumber
		)
	)
);

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Copying Row values to other Column

Here is my way of handling the issue

dtraw << New Column( "ChipID",
	Character,
	Formula(
		If( :SerialNumber != "",
			hold = :SerialNumber
		);
		hold;
	)
);
Jim

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Copying Row values to other Column

You can use Lag() function here.

 

Names Default To Here(1);

dt = New Table("Untitled 6",
	Add Rows(6),
	New Column("SerialNumber", Character, "Nominal", Set Values({"30_A0_0", "", "", "30_A0_01", "", ""}))
);
dt << New Column("ChipID", Character, Nominal, Formula(If(Is Missing(:SerialNumber), Lag(:ChipID), :SerialNumber)));
-Jarmo
txnelson
Super User

Re: Copying Row values to other Column

Here is my way of handling the issue

dtraw << New Column( "ChipID",
	Character,
	Formula(
		If( :SerialNumber != "",
			hold = :SerialNumber
		);
		hold;
	)
);
Jim

Recommended Articles