<?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 Re: Conditional formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484116#M72845</link>
    <description>&lt;P&gt;Hi GroupSquareWolf-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I love working with these types of formula columns, they are like puzzles!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a formula that works for your example. It essentially does the same thing that your multiple columns do, but in a single column. It only uses the Y, X, and Type columns without having to build any additional calculation or counter columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sure there are other solutions out there but here is the one I came up with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_1-1651667980111.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42227iDBD801DA114E22A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_1-1651667980111.png" alt="scott_allen_1-1651667980111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_2-1651668342557.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42228i009BCE4B674C1EE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_2-1651668342557.png" alt="scott_allen_2-1651668342557.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is saved as "New Formula" in the data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Scott&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 May 2022 12:51:41 GMT</pubDate>
    <dc:creator>scott_allen</dc:creator>
    <dc:date>2022-05-04T12:51:41Z</dc:date>
    <item>
      <title>Conditional formula</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484020#M72839</link>
      <description>&lt;P&gt;In the following table, I would like to create a column in which each "Sample" value is divided by the average of "Control" grouped by X.&lt;/P&gt;&lt;P&gt;For examples, each "Sample" in "X1" will be divided by average of "Control" from "X1", each "Sample" in "X2" will be divided by average of "Control" from "X2".&lt;/P&gt;&lt;P&gt;I can get the mean of "Control" by creating a formula that calculates Col Mean grouped by "X" and "Type".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GroupSquareWolf_1-1651617215248.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42218iCD3EC226665095BF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GroupSquareWolf_1-1651617215248.png" alt="GroupSquareWolf_1-1651617215248.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I create a formula that spits out the averages of "Control" for all the rows within each "X" value? In this case 10 for all the rows contain X1, and 1000 for all the rows contain X2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GroupSquareWolf_0-1651616021700.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42217i959078EEBDD6D08E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GroupSquareWolf_0-1651616021700.png" alt="GroupSquareWolf_0-1651616021700.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data file is attached.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:47:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484020#M72839</guid>
      <dc:creator>GroupSquareWolf</dc:creator>
      <dc:date>2023-06-10T23:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formula</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484044#M72842</link>
      <description>&lt;P&gt;I got what I wanted indirectly, but would still appreciate to know a more direct way to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This was what I did&lt;/P&gt;&lt;P&gt;1. I created a conditional formula in :"Type ID", assigning "Sample" as 0 and "Control" as 1&lt;/P&gt;&lt;P&gt;2 . Then multiplied "Type ID" with :"Mean Y by X and Type"&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; created a new column to fill every row with ColMax grouped by "X"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GroupSquareWolf_0-1651638049211.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42220iF2BA6087DB137531/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GroupSquareWolf_0-1651638049211.png" alt="GroupSquareWolf_0-1651638049211.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 10:23:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484044#M72842</guid>
      <dc:creator>GroupSquareWolf</dc:creator>
      <dc:date>2022-05-04T10:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formula</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484116#M72845</link>
      <description>&lt;P&gt;Hi GroupSquareWolf-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I love working with these types of formula columns, they are like puzzles!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a formula that works for your example. It essentially does the same thing that your multiple columns do, but in a single column. It only uses the Y, X, and Type columns without having to build any additional calculation or counter columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sure there are other solutions out there but here is the one I came up with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_1-1651667980111.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42227iDBD801DA114E22A9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_1-1651667980111.png" alt="scott_allen_1-1651667980111.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="scott_allen_2-1651668342557.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/42228i009BCE4B674C1EE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_2-1651668342557.png" alt="scott_allen_2-1651668342557.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is saved as "New Formula" in the data table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Scott&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 12:51:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484116#M72845</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2022-05-04T12:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional formula</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484146#M72850</link>
      <description>&lt;P&gt;Thank you very much! It is very helpful.&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 13:42:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-formula/m-p/484146#M72850</guid>
      <dc:creator>GroupSquareWolf</dc:creator>
      <dc:date>2022-05-04T13:42:16Z</dc:date>
    </item>
  </channel>
</rss>

