<?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 to tweak Col Rank() to give consecutive numbers when using byCol in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782063#M96526</link>
    <description>&lt;P&gt;This formula appears to do what you want.&amp;nbsp; Others may have slicker ways&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;As Constant( Summarize( bygroup = by( :waferID ) ) );
Contains( bygroup, Char( :waferID) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Aug 2024 23:14:00 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-08-15T23:14:00Z</dc:date>
    <item>
      <title>How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782021#M96522</link>
      <description>&lt;P&gt;I use Col Rank() to count runs:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Rank( :DateTime, :WaferID, &amp;lt;&amp;lt;Tie( "minimum" ) )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Each run may have multiple rows, which I can only separate by DateTime, so instead of writing long if statements, I used this formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only thing that I don't like is the following. Let's say I have three rows generated per run, then my RunID column would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and so on. I get where it comes from.&lt;/P&gt;&lt;P&gt;My question is - what would be the cleanest way to convert that to effectively 1, 1, 1, 2, 2, 2, 3, 3, 3?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 22:22:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782021#M96522</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2024-08-15T22:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782063#M96526</link>
      <description>&lt;P&gt;This formula appears to do what you want.&amp;nbsp; Others may have slicker ways&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;As Constant( Summarize( bygroup = by( :waferID ) ) );
Contains( bygroup, Char( :waferID) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 23:14:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782063#M96526</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-15T23:14:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782077#M96528</link>
      <description>&lt;P&gt;I usually use Col Cumulative Sum (or other "tricks" for this)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum(If(Row() == Col Min(Row(), :Column 1), 1,0))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1723781318355.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67190i624AE895389A6F15/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1723781318355.png" alt="jthi_0-1723781318355.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish list:&lt;LI-MESSAGE title="Add dense ranking to Ranking Tie and Col Rank functions" uid="590079" url="https://community.jmp.com/t5/JMP-Wish-List/Add-dense-ranking-to-Ranking-Tie-and-Col-Rank-functions/m-p/590079#U590079" 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;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 04:10:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782077#M96528</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-16T04:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782223#M96545</link>
      <description>&lt;P&gt;Dense ranking - We need it soo often.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There might be some JMP users who don't need dense ranking. For users who need it , it always feels like setting up a Turing machine.&lt;/P&gt;&lt;P&gt;For sure, every time it feels great when it works. And you always feel proud when you can show the trick to a colleague who got stuck.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But just imagine how cool it will feel if Dense Ranking is available via new formula column!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So. Please folks, take the 5 seconds, follow Jarmos link to the wish list and vote!&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 08:03:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782223#M96545</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-08-17T08:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782238#M96549</link>
      <description>And if you have 5 more seconds, please also vote for:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/JMP-Wish-List/Col-N-Categories/idc-p/782236#M6115" target="_blank"&gt;https://community.jmp.com/t5/JMP-Wish-List/Col-N-Categories/idc-p/782236#M6115&lt;/A&gt;</description>
      <pubDate>Fri, 16 Aug 2024 15:56:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782238#M96549</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-08-16T15:56:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782317#M96560</link>
      <description>&lt;P&gt;Thanks a lot for the idea!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My specific case is a little but more complicated, I have one or more categorical columns (i.e. different wafers running etc.)&lt;/P&gt;&lt;P&gt;So the formula ended up being this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( If( Row() == Col Min( Row(), :Rank, :WaferID ), 1, 0 ), :WaferID )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ranking.png" style="width: 308px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67213iE71004A8174AAA87/image-size/large?v=v2&amp;amp;px=999" role="button" title="Ranking.png" alt="Ranking.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;..and you have to keep it as two separate columns, but it works!&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 20:36:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782317#M96560</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2024-08-16T20:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782328#M96562</link>
      <description>&lt;P&gt;Table has to be sorted by your ranking variable, otherwise, if you have rank 2 before rank 1 - in the RunID they will be 1 and 2, respectively (because Col Cumulative Sum, that's why).&lt;/P&gt;&lt;P&gt;Not critical, but RunID order might be important.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 20:43:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782328#M96562</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2024-08-16T20:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782360#M96570</link>
      <description>&lt;P&gt;I consider this to be most reliable way of building this type of ranking in current version of JMP (Col Cumulative Sum) but like you said, data must be sorted. If the original order is important, add row column to your data, sort your data, run the formula for ranking, remove formula, sort back by the row column.&lt;/P&gt;</description>
      <pubDate>Sat, 17 Aug 2024 05:07:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782360#M96570</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-17T05:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to tweak Col Rank() to give consecutive numbers when using byCol</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782377#M96575</link>
      <description>&lt;P&gt;If you don't want to add 2 columns:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Cumulative Sum( If( Row() == Col Min( Row(), :Date, :WaferID ), 1, 0 ), :WaferID )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want to sort the data table *) :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Maximum( Col Rank( If( Row() == Col Min( Row(), :Date, :WaferID ),:Date), :WaferID) ,: Date, :WaferID )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;If you don't want to remember the equation *):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Col Rank(:Date,:WaferID, &amp;lt;&amp;lt;tie("dense"))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;*)&amp;nbsp;&lt;LI-MESSAGE title="Sort data table + add rows + concatenate -&amp;amp;gt; make it possible" uid="724336" url="https://community.jmp.com/t5/JMP-Wish-List/Sort-data-table-add-rows-concatenate-gt-make-it-possible/m-p/724336#U724336" 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;/P&gt;
&lt;P&gt;**) if Jarmo's wish gets enough Kudos:&amp;nbsp;&lt;LI-MESSAGE title="Add dense ranking to Ranking Tie and Col Rank functions" uid="590079" url="https://community.jmp.com/t5/JMP-Wish-List/Add-dense-ranking-to-Ranking-Tie-and-Col-Rank-functions/m-p/590079#U590079" 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;/P&gt;</description>
      <pubDate>Sat, 03 May 2025 15:03:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-tweak-Col-Rank-to-give-consecutive-numbers-when-using/m-p/782377#M96575</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2025-05-03T15:03:23Z</dc:date>
    </item>
  </channel>
</rss>

