<?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: Row selection based on multiple columns and multiple criteria in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10259#M9954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm old fashioned and my first impulse is to use the older Tables &amp;gt; Summary approach which is very similar to using Tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tables &amp;gt; Summary&lt;/P&gt;&lt;P&gt;2. Drag Person, then Compound into the Group box&lt;/P&gt;&lt;P&gt;3. Click Dose and then click the Statistics button and select Max&lt;/P&gt;&lt;P&gt;4. Click OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or as a script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = current data table();&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Summary( Group( :Person, :Compound ), Max( :Dose ) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Nov 2014 21:35:43 GMT</pubDate>
    <dc:creator>mpb</dc:creator>
    <dc:date>2014-11-26T21:35:43Z</dc:date>
    <item>
      <title>Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10255#M9950</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;I read the available threads on row selection but still can't compile a formula to accomplish what I need (sorry - I am VERY inexperienced still..).&lt;/P&gt;&lt;P&gt;I have a table that looks like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 271px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Person&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="79"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Compound&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Dose&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Units&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Smith&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Aspirin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Smith&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Aspirin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;150&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Jones&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Gabapentin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;ug&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Jones&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Gabapentin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;ug&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Jones&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;NyQuil&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mL&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Edison&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Motrin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;600&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Edison&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Motrin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;600&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For each person, I need to look at column Compound and for each Compound, then look at doses and choose the row with higher dose. If one person had used two compounds I need to do dose evaluation for only a comp with multiple doses. So working my way through this table, I should get a new table as below:&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 271px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Person&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="79"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Compound&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Dose&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;" width="64"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Units&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Smith&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Aspirin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;200&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Jones&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Gabapentin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;30&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;ug&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Jones&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;NyQuil&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;60&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mL&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="20" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Edison&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;Motrin&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD align="right" style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;600&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="border: 0px black; border-image: none;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: 12pt;"&gt;mg&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Can someone please help? Will be very much appreciated!!!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 18:37:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10255#M9950</guid>
      <dc:creator>tatiana_khasano</dc:creator>
      <dc:date>2014-11-26T18:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10256#M9951</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can do this with a tabulation:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 162px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" width="50"&gt;&lt;STRONG&gt;Person&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="79"&gt;&lt;STRONG&gt;Compound&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none;" width="33"&gt;&lt;STRONG&gt;Max&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Edison&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Motrin&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;600&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Jones&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Gabapentin&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;30&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;NyQuil&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl64" height="20" style="border-top: none;"&gt;Smith&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;Aspirin&lt;/TD&gt;&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Click on &lt;STRONG&gt;Analyze &amp;gt; Tabulate&lt;/STRONG&gt; (JMP 11) or &lt;STRONG&gt;Tables &amp;gt; Tabulate&lt;/STRONG&gt; (JMP 10, 9, 8)&lt;/img&gt;&lt;/P&gt;&lt;P&gt;Drag &lt;STRONG&gt;Person&lt;/STRONG&gt; to the drop zone for rows.&lt;/P&gt;&lt;P&gt;Drag &lt;STRONG&gt;Compound&lt;/STRONG&gt; just to the right of &lt;STRONG&gt;Person&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Drag &lt;STRONG&gt;Dose&lt;/STRONG&gt; on top of &lt;STRONG&gt;N&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Drag &lt;STRONG&gt;Max&lt;/STRONG&gt; on top of &lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Click&lt;STRONG&gt; Done&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Click the little red triangle and select&lt;STRONG&gt; Make into data table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might have to normalize the units if that's a consideration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 20:03:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10256#M9951</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2014-11-26T20:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10257#M9952</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://kvoqx44227.lithium.com/people/PMroz" target="_blank"&gt;PMroz&lt;/A&gt; has a good solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's another.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sort your table by Name, Compound, (ascending) Dose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a &lt;A href="http://www.jmp.com/support/help/The_Column_Info_Window.shtml#425236" rel="noopener noreferrer" target="_blank"&gt;Row State column&lt;/A&gt; (&lt;STRONG&gt;Cols -&amp;gt; New Column&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7620_JMPScreenSnapz002.png" style="width: 454px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1028i91DF5E0F5DA89345/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7620_JMPScreenSnapz002.png" alt="7620_JMPScreenSnapz002.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;And add a &lt;A href="http://www.jmp.com/support/help/Formula_Editor.shtml#96570" rel="noopener noreferrer" target="_blank"&gt;Formula&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7621_JMPScreenSnapz003.png" style="width: 454px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1029i5B8621A4C5AF0836/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7621_JMPScreenSnapz003.png" alt="7621_JMPScreenSnapz003.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The formula should be:&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;&lt;BR /&gt;&lt;P&gt;&lt;A href="http://www.jmp.com/support/help/Row_State_Functions.shtml" rel="noopener noreferrer" target="_blank"&gt;Selected State&lt;/A&gt;( :Compound != :Compound[&lt;A href="http://www.jmp.com/support/help/Row_Functions.shtml" rel="noopener noreferrer" target="_blank"&gt;Row()&lt;/A&gt; + 1] )&lt;/P&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;In the formula editor it looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7622_JMPScreenSnapz004.png" style="width: 543px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1030i8A355E3DC472F6CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7622_JMPScreenSnapz004.png" alt="7622_JMPScreenSnapz004.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This will select any row where the compound name is different from the compound name in the next row. Since the table is sorted by person, compound, and dose these rows will represent the maximum dose for each person.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can then copy these selections to the active row state area using the pop-up menu next to the row state column name.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7623_JMPScreenSnapz001.png" style="width: 647px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1031iACF4599AA401B58C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7623_JMPScreenSnapz001.png" alt="7623_JMPScreenSnapz001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The rows will be selected and you can use &lt;A href="http://www.jmp.com/support/help/Create_a_Subset_Data_Table.shtml" rel="noopener noreferrer" target="_blank"&gt;Tables-&amp;gt;Subset&lt;/A&gt; to get a new data table with just the selected rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached a data table that shows this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jeff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:08:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10257#M9952</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2016-10-18T22:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10258#M9953</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the logic for selecting the flagged rows might need to be a little more specific?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( :Person == Lag( :Person, 1 ) &amp;amp; :Compound == Lag( :Compound, 1 ),&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; 0,&lt;/SPAN&gt; 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try running this script against the dose table in Jeff's post, then run the sort script first, followed by the subset script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt=current data table();&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt;New Script(&amp;nbsp; "Sort First",&amp;nbsp; dt = Current Data Table();&amp;nbsp; dt &amp;lt;&amp;lt; Sort(&amp;nbsp; replace table,&lt;/P&gt;&lt;P&gt;&amp;nbsp; By( :Person, :Compound, :Dose ),&amp;nbsp; Order( Ascending, Ascending, Ascending )););&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt;New Script(&amp;nbsp; "subset flagged rows",&amp;nbsp; dt = Current Data Table();&amp;nbsp; dt &amp;lt;&amp;lt; Select Where( :Flag == 1 );&lt;/P&gt;&lt;P&gt;&amp;nbsp; dt &amp;lt;&amp;lt; Subset(&amp;nbsp; Output Table( "Subset of dose bw" ),&amp;nbsp; Selected Rows( 0 ),&amp;nbsp; Rows( [1, 3, 5, 6] ),&amp;nbsp; Selected columns only( 0 )););&lt;/P&gt;&lt;P&gt;dt&amp;lt;&amp;lt;New Column( "Flag",&lt;/P&gt;&lt;P&gt;&amp;nbsp; Numeric,&amp;nbsp; Nominal,&amp;nbsp; Format( "Best", 12 ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; Formula(&amp;nbsp; If( :Person == Lag( :Person, 1 ) &amp;amp; :Compound == Lag( :Compound, 1 ),&lt;/P&gt;&lt;P&gt;&amp;nbsp; 0,&amp;nbsp; 1&amp;nbsp; )&amp;nbsp; ));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 20:59:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10258#M9953</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2014-11-26T20:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10259#M9954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm old fashioned and my first impulse is to use the older Tables &amp;gt; Summary approach which is very similar to using Tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Tables &amp;gt; Summary&lt;/P&gt;&lt;P&gt;2. Drag Person, then Compound into the Group box&lt;/P&gt;&lt;P&gt;3. Click Dose and then click the Statistics button and select Max&lt;/P&gt;&lt;P&gt;4. Click OK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or as a script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = current data table();&lt;/P&gt;&lt;P&gt;dt &amp;lt;&amp;lt; Summary( Group( :Person, :Compound ), Max( :Dose ) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Nov 2014 21:35:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10259#M9954</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2014-11-26T21:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10260#M9955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://kvoqx44227.lithium.com/people/Byron" target="_blank"&gt;Byron&lt;/A&gt; is right. I was a little too quick and forgot that if two people in sequence are taking the same compound then my condition won't catch the first one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a corrected formula and data table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;&lt;BR /&gt;&lt;P&gt;Selected State( :Compound != :Compound[Row() + 1] | :Person != :Person[Row() + 1] )&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="7624_JMPScreenSnapz005.png" style="width: 1086px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/1032i274DEEA5AFC6BEF8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="7624_JMPScreenSnapz005.png" alt="7624_JMPScreenSnapz005.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This time it selects the row if the compound or the person doesn't match the next row.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 22:08:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10260#M9955</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2016-10-18T22:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Row selection based on multiple columns and multiple criteria</title>
      <link>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10261#M9956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, guys!&lt;/P&gt;&lt;P&gt;I tried all three solutions - and got the table I wanted.&lt;/P&gt;&lt;P&gt;It is way simpler than I thought - and I love summary and tabulate functions!!&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;P&gt;Tania&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Dec 2014 00:11:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Row-selection-based-on-multiple-columns-and-multiple-criteria/m-p/10261#M9956</guid>
      <dc:creator>tatiana_khasano</dc:creator>
      <dc:date>2014-12-01T00:11:31Z</dc:date>
    </item>
  </channel>
</rss>

