<?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: How do I use the Col Maximum Formula with a &amp;quot;where&amp;quot; condition in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231098#M45832</link>
    <description>Hi Mark,&lt;BR /&gt;Can you give an example on how to use the &amp;lt;byVar&amp;gt; when using col Max?&lt;BR /&gt;&lt;BR /&gt;thanks.</description>
    <pubDate>Mon, 28 Oct 2019 17:35:21 GMT</pubDate>
    <dc:creator>wu</dc:creator>
    <dc:date>2019-10-28T17:35:21Z</dc:date>
    <item>
      <title>How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/34840#M20583</link>
      <description>&lt;P&gt;Hi, I have a problem where I want to formulate a new column as a benchmark to all other countries. If there are more rows for the country, I want to take the max value of it as the benchmark. See the example below for clarification.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data kind of looks like this:&lt;BR /&gt;Country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&lt;/P&gt;&lt;P&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I want to achieve (with cell formula): Col Maximum (:value, :period, :country) &lt;STRONG&gt;where :country == "A"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Output:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Country&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; period &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BenchMark&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 50 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;D&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 40 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 201301&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, I want to benchmark the max value of only country A.&lt;/P&gt;&lt;P&gt;I tried Col Maximum (:value, :period, :country == "A") and it will return "50"&lt;/P&gt;&lt;P&gt;Col Maximum (:value, :period, :country) and Col Maximum (:value, :period, :country == "A") both returns "50"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am pretty sure there's a simple solution for this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you guys can help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 03:54:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/34840#M20583</guid>
      <dc:creator>apploarcher</dc:creator>
      <dc:date>2017-01-23T03:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/34841#M20584</link>
      <description>&lt;P&gt;Given the way you stated your needs, Assuming you know what the country that has the multiple entries.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();
rowperiod = :Period[Row()];
Max(
	:Value[dt &amp;lt;&amp;lt; get rows where(
		:Country == "A" &amp;amp; :period == rowperiod
	)]
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2017 05:28:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/34841#M20584</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-01-23T05:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/35085#M20707</link>
      <description>Sorry for the late reply! Thanks for the solution!</description>
      <pubDate>Mon, 30 Jan 2017 13:39:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/35085#M20707</guid>
      <dc:creator>apploarcher</dc:creator>
      <dc:date>2017-01-30T13:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63951#M34173</link>
      <description>&lt;P&gt;Suppose the country column has several names and I do not know all the possible values. How can this query be tweaked to do that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do that by creating a summary table and then updating the table back, but that seems to be ineffecient method, was curious if it could be done in a single step like this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 02:57:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63951#M34173</guid>
      <dc:creator>deveshchugh</dc:creator>
      <dc:date>2018-07-26T02:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63952#M34174</link>
      <description>&lt;P&gt;I typically use the Summarize() function, rather than the Summary Platform, to do easy determination of what levels within a column are found.&amp;nbsp; Then, from there, you just have to generate the formula's you need to get the job done.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 03:08:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63952#M34174</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-26T03:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63954#M34176</link>
      <description>&lt;P&gt;Thanks Jim, I meant summarize only. How I do it is (two jsl commands):&lt;/P&gt;&lt;P&gt;Summarize on the column, create new table with values (min/max/or any other statistic for the column).&lt;/P&gt;&lt;P&gt;Then I update the main table using the summarized table by matching the row entries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was just curious if there is conditional option in Max col() command which can identify unique column values and eliminate the need for this extra step. (would eliminate an extra table and an 2 extra steps).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:01:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63954#M34176</guid>
      <dc:creator>deveshchugh</dc:creator>
      <dc:date>2018-07-26T05:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63959#M34179</link>
      <description>&lt;P&gt;See Help &amp;gt; Scripting Index &amp;gt; Functions:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 367px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/11699iFBDF4153E254DB63/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jul 2018 10:56:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/63959#M34179</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2018-07-26T10:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231098#M45832</link>
      <description>Hi Mark,&lt;BR /&gt;Can you give an example on how to use the &amp;lt;byVar&amp;gt; when using col Max?&lt;BR /&gt;&lt;BR /&gt;thanks.</description>
      <pubDate>Mon, 28 Oct 2019 17:35:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231098#M45832</guid>
      <dc:creator>wu</dc:creator>
      <dc:date>2019-10-28T17:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231141#M45839</link>
      <description>&lt;P&gt;I could add this formula to a new column in the Big Class example data table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Max( :weight, :age )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Oct 2019 19:06:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231141#M45839</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-10-28T19:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231376#M45882</link>
      <description>&lt;P&gt;Hi Mark,&lt;BR /&gt;tried to get maximum weight by age or sex, but only produce one value in the following script.&lt;BR /&gt;by ages, there were 6 different ages, for each of them, I'd like to compute the maximum weight for each age.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
max_weight_by_age = Col Max( :weight, :age );
max_weight_by_sex = Col Max( :weight, :sex );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Oct 2019 11:32:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231376#M45882</guid>
      <dc:creator>wu</dc:creator>
      <dc:date>2019-10-30T11:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231377#M45883</link>
      <description>&lt;P&gt;Col Maximum() is only viable in a formula, where a separage result per row is the output.&amp;nbsp; To do what you want, use the Summarize() function.&lt;/P&gt;
&lt;P&gt;See:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Scripting Index==&amp;gt;Summarize&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2019 00:45:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231377#M45883</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-10-30T00:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231474#M45906</link>
      <description>thanks.</description>
      <pubDate>Wed, 30 Oct 2019 16:42:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/231474#M45906</guid>
      <dc:creator>wu</dc:creator>
      <dc:date>2019-10-30T16:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/571889#M78145</link>
      <description>&lt;P&gt;Interesting question - sill waiting for an answer?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a set of posts with similar questions how to restrict the &lt;STRONG&gt;Col ... aggregation&lt;/STRONG&gt; functions to a specific subset.&lt;BR /&gt;(mainly: restrict them to the subset of non-excluded rows)&lt;BR /&gt;&lt;LI-MESSAGE title="Compute Column Mean while restricting observations used" uid="10377" url="https://community.jmp.com/t5/Discussions/Compute-Column-Mean-while-restricting-observations-used/m-p/10377#U10377" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="JMP10: Col Max() and Col Min() functions returned the data from excluded row" uid="10555" url="https://community.jmp.com/t5/Discussions/JMP10-Col-Max-and-Col-Min-functions-returned-the-data-from/m-p/10555#U10555" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="Col Functions and Row States" uid="351705" url="https://community.jmp.com/t5/Discussions/Col-Functions-and-Row-States/m-p/351705#U351705" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea:&amp;nbsp;&lt;/P&gt;&lt;P&gt;If one is interested in the mean height, one can aggregate over all rows - or one can aggreate male and female entries separately.&lt;/P&gt;&lt;P&gt;For the second one the solution is almost as easy as for the first one: just use an additional GroupBy variable to split between wanted and unwanted data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, what a user often needs in addition: &lt;EM&gt;the values should&amp;nbsp; show up in all respective rows (i.e. also for female).&lt;BR /&gt;&lt;/EM&gt;[The example with the benchmark column in the original post illustrates why such a behavior could make sense.]&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;With the GroupBy, it's easy to get the correct values - but how to distribute them over ALL rows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is something like a lookup table behinde a&amp;nbsp;&lt;STRONG&gt;Col ... aggregation&lt;/STRONG&gt; function, the function uses the same identifier&lt;BR /&gt;1)&amp;nbsp;to split rows to different groups for aggregation&amp;nbsp;("M" / "F"):&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; Judy is female, the weight in Judy's row should be included in &lt;STRONG&gt;female mean weight&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;2) as index when reading an entry from the lookup table ("M" / "F"):&lt;BR /&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; Judy is female, the new column should contain &lt;STRONG&gt;female mean weight &lt;/STRONG&gt;in Judy's row&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, either male and female get the same values, because the identifier is the same (mean1) - or they get different values because the identifier is different (mean2).&lt;BR /&gt;&lt;BR /&gt;ergo:&amp;nbsp;&lt;BR /&gt;A Jmp user &lt;EM&gt;can&lt;/EM&gt; use the GroupBy feature to remove values from the calculation via:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- &lt;STRONG&gt;calculate&lt;/STRONG&gt;&amp;nbsp;different values for different subgroups&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- dump the unwanted results&lt;/EM&gt;&lt;BR /&gt;but then he gets&lt;BR /&gt;&lt;EM&gt;- &lt;STRONG&gt;get &lt;/STRONG&gt;different values for different subgroups&lt;/EM&gt;&lt;BR /&gt;for free - even if the he did not order this option (OK, the code tells another story - but let's&amp;nbsp; think about what the user wanted)&amp;nbsp;:)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a &lt;STRONG&gt;one-line command&lt;/STRONG&gt; to remove female from the mean calculation, but to write the values into the respective rows with "female"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column("mean1", Formula(Col Mean(:weight, :age)));
dt &amp;lt;&amp;lt; New Column("mean2", Formula(Col Mean(:weight, :age, :sex)));
dt &amp;lt;&amp;lt; New Column("mean2", Formula(If(:sex=="M", Col Mean(:weight, :age, :sex))));

dtM = dt &amp;lt;&amp;lt; subset( Rows( dt &amp;lt;&amp;lt; get rows where( :sex== "M" ) ), selected columns( 0 ));
dtM &amp;lt;&amp;lt; New Column("mean_M", Formula(Col Mean(:weight, :age)));
dt &amp;lt;&amp;lt; Update(
	With( dtM ),
	Match Columns(:age = :age ),
	Add Columns from Update Table( :mean_M ),
	Replace Columns in Main Table( None )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 19:58:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/571889#M78145</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-06-27T19:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577021#M78464</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;Is there a &lt;STRONG&gt;one-line command&lt;/STRONG&gt; to remove female from the mean calculation, but to write the values into the respective rows with "female"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I mean, something like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Mean( :weight, :age, where( :sex == "M" ) )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 18:50:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577021#M78464</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-03T18:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577026#M78465</link>
      <description>&lt;P&gt;Apply an If() to the :weight column in the equation&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1670095673215.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/47905i9011E1373D361D74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1670095673215.png" alt="txnelson_0-1670095673215.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col Mean( if(:sex=="M", :weight,.), :age)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Dec 2022 19:28:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577026#M78465</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-12-03T19:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577072#M78466</link>
      <description>&lt;P&gt;Fantastic!&lt;/P&gt;&lt;P&gt;And so logic - when you see it!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am very disappointed with myself that I did not find this solution on my own.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Dec 2022 17:02:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/577072#M78466</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2022-12-04T17:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/578576#M78599</link>
      <description>&lt;P&gt;Hm, after some enthusiasm, I got a little grounded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems that the &lt;STRONG&gt;if&lt;/STRONG&gt; inside the Col Aggregation makes it very slow - especially if there is a character comparison inside the if - and especially x 2 if there is a char(num) conversion. Then the time scales ~ quadratic with increasing table size.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The good thing: &lt;STRONG&gt;Col Median&lt;/STRONG&gt; (which I use most of the time) is not affected by this "bug" :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;Is there any easy solution for Col Min, max, mean ...?&lt;/P&gt;&lt;P&gt;If not, I will write a &lt;EM&gt;wish&lt;/EM&gt; to implement an official way to calculate&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;Col xyz&lt;/STRONG&gt;&amp;nbsp; with a &lt;STRONG&gt;where&lt;/STRONG&gt;&amp;nbsp;condition ...&lt;BR /&gt;&lt;BR /&gt;Would be much faster if the data set was first reduced (&lt;STRONG&gt;where&lt;/STRONG&gt;) and then aggregated (&lt;STRONG&gt;Col xyz&lt;/STRONG&gt;) and then the values distributed over all respective rows.&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="hogi_1-1675014209216.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49591iBADFF3AB6F9D34F7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1675014209216.png" alt="hogi_1-1675014209216.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
If( Is Empty( mydt ),
	mydt = Open( "$SAMPLE_DATA/Big Class.jmp" )
);
trialRun = 0;
tryAgain = Function( {},
	trialRun += 1;
	Rownumbers = N Rows( mydt );
	t1 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col A", Formula( Col Mean( :weight ), :sex ) );
	t2 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col B", Formula( Col Mean( If( :age == 12, :weight, . ), :sex ) ) );
	t3 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col C", Formula( Col Mean( If( :sex == "M", :weight, . ), :age ) ) );
	t4 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col D", Formula( Col Mean( If( Char( :age ) == "12", :weight, . ), :age ) ) );
	t5 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col E", Formula( Char( :age ) == "12" ) );
	t6 = HP Time();

	tt1 = Round( (t2 - t1) / 1000000, 4 );
	tt2 = Round( (t3 - t2) / 1000000, 4 );
	tt3 = Round( (t4 - t3) / 1000000, 4 );
	tt4 = Round( (t5 - t4) / 1000000, 4 );
	tt5 = Round( (t6 - t5) / 1000000, 6 );

	If( trialRun == 1,
		tt1Ref = tt1;
		tt2Ref = tt2;
		tt3Ref = tt3;
		tt4Ref = tt4;
		tt5Ref = tt5;
		RNref = Rownumbers;
	);
	tr1 = Round( tt1 / tt1Ref );
	tr2 = Round( tt2 / tt2Ref );
	tr3 = Round( tt3 / tt3Ref );
	tr4 = Round( tt4 / tt4Ref );
	tr5 = Round( tt5 / tt5Ref );
	RNratio = Round( RowNumbers / RNref );

	Wait( 0.1 );
	Try( mydt &amp;lt;&amp;lt; delete columns( "col A", "col B", "col C", "col D", "col E" ) );
	Wait( 0.1 );
	mydt = mydt &amp;lt;&amp;lt; Concatenate( mydt, mydt, mydt );
	Wait( 0.1 );
	If(
		ex = New Window( "results",
			&amp;lt;&amp;lt;Type( "Modal Dialog" ),
			&amp;lt;&amp;lt;Return Result,
			V List Box(
				Panel Box( "timing results: " || Char( Rownumbers ) || " rows (x" || Char( RNratio ) || ")",
					Lineup Box( N Col( 3 ),
						Text Box( "col min(groupBy)" ),
						Text Box( Char( tt1 ) || " s" ),
						Text Box( "(x" || Char( tr1 ) || ")" ),
						Text Box( "col min(If(numeric),groupBy)" ),
						Text Box( Char( tt2 ) || " s" ),
						Text Box( "(x" || Char( tr2 ) || ")" ),
						Text Box( "col min(If(character),groupBy)" ),
						Text Box( Char( tt3 ) || " s" ),
						Text Box( "(x" || Char( tr3 ) || ")" ),
						Text Box( "col min(If(char(num)),groupBy)" ),
						Text Box( Char( tt4 ) || " s" ),
						Text Box( "(x" || Char( tr4 ) || ")" ),
						Text Box( "char(num)" ),
						Text Box( Char( tt5 ) || "s" ),
						Text Box( "(x" || Char( tr5 ) || ")" ), 

					),
					Text Box( "\!nTable length increased by a factor x4!\!nAre you brave?\!nThen let's add the rows again ..." ),
					H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
				)
			)
		);
		ex["button"] == 1;
	,
		tryAgain()
	);
);

tryAgain();&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a previous version I had "ms" in the table instead of seconds. Unfortunately, it's 1000x more severe ...&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 20:16:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/578576#M78599</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-16T20:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/594644#M79854</link>
      <description>&lt;P&gt;An approach to speed things up by &lt;STRONG&gt;orders of magnitudes&lt;/STRONG&gt; (!!!):&lt;BR /&gt;&lt;BR /&gt;Instead of the very slow Col Mean &lt;STRONG&gt;with the character comparison inside the if statement&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mydt &amp;lt;&amp;lt; New Column( "col C", Formula( Col Mean( If( :name=="ROBERT", :weight, . ), :age ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;use&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/8582"&gt;@cwillden&lt;/a&gt;&amp;nbsp;'s trick: use the comparison as a GroupBy argument:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Get-Rows-that-satisfy-a-condition-within-a-column-formula/m-p/49397/highlight/true#M28095" target="_blank" rel="noopener"&gt;Solved: Re: Get Rows that satisfy a condition within a column formula - JMP User Community&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mydt &amp;lt;&amp;lt; New Column( "col C", Formula(if(:name=="ROBERT" , Col Mean(  :weight, :age, :name=="Robert" ),. ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to split the data in 2 groups: wanted and unwanted data&amp;nbsp; (screenshot below with&amp;nbsp;@10k rows -&amp;gt;&amp;nbsp; Factor 2000 faster :)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;..&amp;nbsp; and then remove the unwanted results via the if statement outside of the Col Mean aggregation.&lt;BR /&gt;&lt;BR /&gt;With the comparison for the column&amp;nbsp;&lt;STRONG&gt;:sex&lt;/STRONG&gt;&amp;nbsp;this approach would be over-engineered; this is why I switched to the &lt;STRONG&gt;:name&lt;/STRONG&gt; comparison to illustrate the concept.&lt;BR /&gt;This is also kind of over-engineered, but I hope the idea gets clear :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1675013952162.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/49590iFDF6BF83F6CB46C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1675013952162.png" alt="hogi_0-1675013952162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
If( Is Empty( mydt ),
	mydt = Open( "$SAMPLE_DATA/Big Class.jmp" )
);
trialRun = 0;
tryAgain = Function( {},
	trialRun += 1;
	Rownumbers = N Rows( mydt );
	t2 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col B", Formula(If(:name=="ROBERT" , Col Mean( :weight,  :age, :name=="ROBERT" ),.) ) );
	t3 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "col C", Formula( Col Mean( If( :name == "ROBERT", :weight, . ), :age ) ) );
	t4 = HP Time();


	tt2 = Round( (t3 - t2) / 1000000, 4 );
	tt3 = Round( (t4 - t3) / 1000000, 4 );

	If( trialRun == 1,
		tt2Ref = tt2;
		tt3Ref = tt3;
		RNref = Rownumbers;
	);
	tr2 = Round( tt2 / tt2Ref );
	tr3 = Round( tt3 / tt3Ref );

	RNratio = Round( RowNumbers / RNref );

	Wait( 0.1 );
	Try( mydt &amp;lt;&amp;lt; delete columns( "col B", "col C") );
	Wait( 0.1 );
	mydt = mydt &amp;lt;&amp;lt; Concatenate( mydt, mydt, mydt );
	Wait( 0.1 );
	If(
		ex = New Window( "results",
			&amp;lt;&amp;lt;Type( "Modal Dialog" ),
			&amp;lt;&amp;lt;Return Result,
			V List Box(
				Panel Box( "timing results: " || Char( Rownumbers ) || " rows (x" || Char( RNratio ) || ")",
					Lineup Box( N Col( 3 ),
						Text Box( "if(col min(groupBy,Charcomparison))" ),
						Text Box( Char( tt2 ) || " s" ),
						Text Box( "(x" || Char( tr2 ) || ")" ),
						Text Box( "col min(If(character),groupBy)" ),
						Text Box( Char( tt3 ) || " s" ),
						Text Box( "(x" || Char( tr3 ) || ")" ) 

					),
					Text Box( "\!nTable length increased by a factor x4!\!nAre you brave?\!nThen let's add the rows again ..." ),
					H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
				)
			)
		);
		ex["button"] == 1;
	,
		tryAgain()
	);
);

tryAgain();&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 21:52:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/594644#M79854</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-11-11T21:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/656616#M84565</link>
      <description>&lt;P&gt;the topic got some attention from the Jmp Development team:&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="Col Median (and others): add &amp;amp;quot;Where&amp;amp;quot; option" uid="579482" url="https://community.jmp.com/t5/JMP-Wish-List/Col-Median-and-others-add-quot-Where-quot-option/m-p/579482#U579482" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/32729"&gt;@SamGardner&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;SPAN class=""&gt;Status changed to:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.jmp.com/t5/JMP-Wish-List/idb-p/jmp-wish-list/status-key/under_consideration" target="_blank" rel="noopener"&gt;We like it! (in the queue)&lt;/A&gt;&lt;/SPAN&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;nbsp;...&amp;nbsp; we work on ways to improve how Where( ) clauses are used throughout JMP.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Seems that soon there will be a much easier solution for the problem :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 21:53:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/656616#M84565</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-11-11T21:53:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use the Col Maximum Formula with a "where" condition</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/810363#M99287</link>
      <description>&lt;P&gt;Fun Fact:&lt;BR /&gt;&lt;EM&gt;searching for "M" in a list of strings&amp;nbsp; is orders of magnitude faster than comparing "M" with a string:&lt;/EM&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="hogi_0-1731362482542.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/70059i4A9CB5BE21C206D7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1731362482542.png" alt="hogi_0-1731362482542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
If( Is Empty( mydt ),
	mydt = Open( "$SAMPLE_DATA/Big Class.jmp" )
);

tryAgain = Function( {},

	write ("\!nrows: ", nrows(mydt),"\!n");
	t0 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "char=char", Formula( Col Mean( If( :sex == "M", :weight, . ), :age ) ) );
	t=(HP Time()- t0)/1000000;
	write("char=char: ",t,"\!n");
	
	t0 = HP Time();
	mydt &amp;lt;&amp;lt; New Column( "contains", Formula( Col Mean( If( contains(Eval List({:sex[]}) ,"M"), :weight, . ), :age ) ) );
	t=(HP Time()- t0)/1000000;
	write("contains: ",t,"\!n");
	

	If(
		ex = New Window( "",
			&amp;lt;&amp;lt;Type( "Modal Dialog" ),
			&amp;lt;&amp;lt;Return Result,
			V List Box(

					Text Box( "\!nTable length increased by a factor x4!\!nAnother step - are you brave ?" ),
					H List Box( Button Box( "OK" ), Button Box( "Cancel" ) )
				)
		);
		ex["button"] == 1;
	,
		mydt = mydt &amp;lt;&amp;lt; Concatenate( mydt, mydt, mydt );
		tryAgain()
	);
);

tryAgain();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;why?!?&lt;BR /&gt;Which secret is behind this finding?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 22:03:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-use-the-Col-Maximum-Formula-with-a-quot-where-quot/m-p/810363#M99287</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-11-11T22:03:16Z</dc:date>
    </item>
  </channel>
</rss>

