<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic recherche d'une formule avec une condition in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966258#M110411</link>
    <description>&lt;P&gt;bonjour,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;je cherche à créer une colonne qui calculerait la différence MG1 - MG2 si la valeur dans la colonne Identification est identique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;donc la différence entre les 2 valeurs jaunes ou entre les 2 valeurs en bleu.&lt;/P&gt;
&lt;P&gt;quelle serait la formule ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cordialement&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d'écran 2026-08-26 153209.png" style="width: 510px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/114357iD6A6A01EFAC0C867/image-dimensions/510x357?v=v2" width="510" height="357" role="button" title="Capture d'écran 2026-08-26 153209.png" alt="Capture d'écran 2026-08-26 153209.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Aug 2026 13:38:40 GMT</pubDate>
    <dc:creator>Françoise</dc:creator>
    <dc:date>2026-08-26T13:38:40Z</dc:date>
    <item>
      <title>recherche d'une formule avec une condition</title>
      <link>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966258#M110411</link>
      <description>&lt;P&gt;bonjour,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;je cherche à créer une colonne qui calculerait la différence MG1 - MG2 si la valeur dans la colonne Identification est identique.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;donc la différence entre les 2 valeurs jaunes ou entre les 2 valeurs en bleu.&lt;/P&gt;
&lt;P&gt;quelle serait la formule ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cordialement&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d'écran 2026-08-26 153209.png" style="width: 510px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/114357iD6A6A01EFAC0C867/image-dimensions/510x357?v=v2" width="510" height="357" role="button" title="Capture d'écran 2026-08-26 153209.png" alt="Capture d'écran 2026-08-26 153209.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2026 13:38:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966258#M110411</guid>
      <dc:creator>Françoise</dc:creator>
      <dc:date>2026-08-26T13:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: recherche d'une formule avec une condition</title>
      <link>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966297#M110413</link>
      <description>&lt;P&gt;Hello-&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;The first question to consider, is if you want to stay with this row structure with so many missing entries.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Consider a structure with one row per batch.&lt;BR /&gt;Table Menu, Summary&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Group By Identification&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Select MG1 and MG2, Use the Mean (which will ignore missing)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if there is potential that the data is not clean, also include the Range (investigate anything other than zero)&lt;BR /&gt;You will then have a summarized table by batch, which will make calculating the difference easier.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Data Table( "SAMPLE" ) &amp;lt;&amp;lt; 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" )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you want to do it within the original data table, a formula column such as&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;An alternative that only calculates when MG1 is populated for that identification and on the specific row where MG2 is located..&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( !Is Missing( :MG2 ) &amp;amp; !Is Missing( Col Mean( :MG1, :Identification ) ),
	Col Mean( :MG1, :Identification ) - Col Mean( :MG2, :Identification ),
	.
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Aug 2026 16:01:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966297#M110413</guid>
      <dc:creator>GregF_JMP</dc:creator>
      <dc:date>2026-08-26T16:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: recherche d'une formule avec une condition</title>
      <link>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966303#M110414</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;perfect!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2026 16:55:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/recherche-d-une-formule-avec-une-condition/m-p/966303#M110414</guid>
      <dc:creator>Françoise</dc:creator>
      <dc:date>2026-08-26T16:55:06Z</dc:date>
    </item>
  </channel>
</rss>

