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
Françoise
Level VI

recherche d'une formule avec une condition

bonjour,

 

je cherche à créer une colonne qui calculerait la différence MG1 - MG2 si la valeur dans la colonne Identification est identique.

 

donc la différence entre les 2 valeurs jaunes ou entre les 2 valeurs en bleu.

quelle serait la formule ?

 

cordialementCapture d'écran 2026-08-26 153209.png

1 ACCEPTED SOLUTION

Accepted Solutions
GregF_JMP
Staff

Re: recherche d'une formule avec une condition

Hello-
It looks like you possibly have a batch process, labelled by identification- where the values of MG1, MG2 are recorded at various times, each with their own row.

The first question to consider, is if you want to stay with this row structure with so many missing entries.


Consider a structure with one row per batch.
Table Menu, Summary
    Group By Identification
    Select MG1 and MG2, Use the Mean (which will ignore missing)
         if there is potential that the data is not clean, also include the Range (investigate anything other than zero)
You will then have a summarized table by batch, which will make calculating the difference easier.

Data Table( "SAMPLE" ) << Summary(
	Group( :Identification ),
	Mean( :MG1 ),
	Mean( :MG2 ),
	Range( :MG1 ),
	Range( :MG2 ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "column stat" ),
	output table name( "Summary of SAMPLE" )
);




If you want to do it within the original data table, a formula column such as

Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification )

An alternative that only calculates when MG1 is populated for that identification and on the specific row where MG2 is located..

If( !Is Missing( :MG2 ) & !Is Missing( Col Mean( :MG1, :Identification ) ),
	Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification ),
	.
)

View solution in original post

2 REPLIES 2
GregF_JMP
Staff

Re: recherche d'une formule avec une condition

Hello-
It looks like you possibly have a batch process, labelled by identification- where the values of MG1, MG2 are recorded at various times, each with their own row.

The first question to consider, is if you want to stay with this row structure with so many missing entries.


Consider a structure with one row per batch.
Table Menu, Summary
    Group By Identification
    Select MG1 and MG2, Use the Mean (which will ignore missing)
         if there is potential that the data is not clean, also include the Range (investigate anything other than zero)
You will then have a summarized table by batch, which will make calculating the difference easier.

Data Table( "SAMPLE" ) << Summary(
	Group( :Identification ),
	Mean( :MG1 ),
	Mean( :MG2 ),
	Range( :MG1 ),
	Range( :MG2 ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "column stat" ),
	output table name( "Summary of SAMPLE" )
);




If you want to do it within the original data table, a formula column such as

Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification )

An alternative that only calculates when MG1 is populated for that identification and on the specific row where MG2 is located..

If( !Is Missing( :MG2 ) & !Is Missing( Col Mean( :MG1, :Identification ) ),
	Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification ),
	.
)
Françoise
Level VI

Re: recherche d'une formule avec une condition

Hi,

perfect!

 

thanks !

 

Recommended Articles