<?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: new column: rank unique in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/718243#M90050</link>
    <description>&lt;P&gt;Hm, still the same in Jmp 18:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1706045579361.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60523i434C02FCC45B055A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1706045579361.png" alt="hogi_0-1706045579361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Following an idea of&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;from &lt;LI-MESSAGE title="Add Counter for Unique Cases in Groups" uid="630320" url="https://community.jmp.com/t5/Discussions/Add-Counter-for-Unique-Cases-in-Groups/m-p/630320#U630320" 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;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "rank_unique (sex) by age",
	Formula(
		Col Minimum(
			Col Rank( If( Row() == Col Min( Row(), :age, :sex ), 1 ), :age ),
			:age,
			:sex
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;just a value for the first of each sex X age&lt;/LI&gt;&lt;LI&gt;generate rank&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;use Col Minimum to broadcast the values to the other rows&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Tue, 23 Jan 2024 22:01:41 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-01-23T22:01:41Z</dc:date>
    <item>
      <title>new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678059#M86448</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to create a column with values 1,2,3 - N to label unique values in another column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the community, there are several similar posts&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;LI-MESSAGE title="How to create a new column with numerical number based on the unique grouping of column A" uid="658213" url="https://community.jmp.com/t5/Discussions/How-to-create-a-new-column-with-numerical-number-based-on-the/m-p/658213#U658213" 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="Rank Unique" uid="286665" url="https://community.jmp.com/t5/Discussions/Rank-Unique/m-p/286665#U286665" 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;with a variety of solutions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the one cool solution I did not find up to now.&lt;BR /&gt;It should be&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;dynamic (react on changes in the table) -&amp;gt; no tables/Summary, no&amp;nbsp;Label to code&lt;/LI&gt;&lt;LI&gt;independent of the column type (at least: Character + Numeric) -&amp;gt; no&amp;nbsp;Label to code&lt;/LI&gt;&lt;LI&gt;functional even for non-sorted tables -&amp;gt; no lag&lt;/LI&gt;&lt;LI&gt;fast -&amp;gt; no associative array&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Best: a short function like&amp;nbsp; (*)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rank unique(:col1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or an option of a function&amp;nbsp; (**)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rank(:col1, &amp;lt;&amp;lt; unique(1))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I found the option&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rank(:col1, &amp;lt;&amp;lt; tie(mode))&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but I did not find a &lt;STRONG&gt;&lt;EM&gt;mode&lt;/EM&gt; &lt;/STRONG&gt;which produces number 1, 2,3 ... N&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I thought that one can get there by using&amp;nbsp;&lt;STRONG&gt;rank&lt;/STRONG&gt; twice:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Column( "step1",Formula( Col Rank( :sex, &amp;lt;&amp;lt;tie( "average" ) ) ));
New Column( "step2",Formula( Col Rank( :step1 ) ));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But step2 knows some secrets about column step1 which the user can't see:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_1-1694780161740.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56666iE0FB6DBC604F86E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_1-1694780161740.png" alt="hogi_1-1694780161740.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What works:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Column( "Rank[sex]",
	Formula(
		If(row() == 1,summarize(values= by(:sex)));
		Contains( values, :sex )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am still searching for (*) or (**) and hope that I can find it in the New Formula column right click context menu. But where?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 12:20:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678059#M86448</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-15T12:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678160#M86456</link>
      <description>&lt;P&gt;There isn't single Col function that can perform this task. You can do this with Col functions, but it will most likely require few of&amp;nbsp; those and be slower than using Summarize (or Associative Array).&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, 15 Sep 2023 15:24:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678160#M86456</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-15T15:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678173#M86457</link>
      <description>&lt;P&gt;A pity with the Wish list entries - there are so good ones - but they stay unnoticed.&lt;BR /&gt;How could I have missed this one ...&lt;BR /&gt;-&amp;gt; Kudo from my side.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 15:28:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678173#M86457</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-15T15:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678181#M86458</link>
      <description>&lt;P&gt;Search isn't the best one in JMP community, so I should have added more "keywords" to title, such as the unique ranking. This is a problem that I face from time to time at work, but luckily (at least not yet...) either the calculation speed isn't an issue or I don't need dynamic formula.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 15:41:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678181#M86458</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-09-15T15:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678182#M86459</link>
      <description>&lt;P&gt;search: Thank you for your post on usin the community.&lt;BR /&gt;Sine that time, I follow your suggestion and always use Google search - I even added a shortcut to my browser.&lt;BR /&gt;&lt;BR /&gt;In the past, a good approach was to send a post to the community, then open it and look at the suggestions of "related posts" on the right - but since the update of the community layout&amp;nbsp;I can't find this feature anymore.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A nice application for Rank unique:&lt;BR /&gt;In Graph Builder when I put wafers into the Group X drop zone and variants into the Group Y drop zone, if it's no DOE and every wafer has just one variant, I get a very sparse plot with a lot of white area.&lt;BR /&gt;Then it's cool to have the rank 1,2,3 ... for the Group X drop zone and the wafer info just via Hover label.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not really essential to have the dynamic version - but I have a better feeling if the values adjust automatically after some table update - such that it's guaranteed that there are no old values.&lt;BR /&gt;Associative Arrays get very slow already for decent length of data. really dangerous if did not save your data ...&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2023 15:55:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/678182#M86459</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2023-09-15T15:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: new column: rank unique</title>
      <link>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/718243#M90050</link>
      <description>&lt;P&gt;Hm, still the same in Jmp 18:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1706045579361.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/60523i434C02FCC45B055A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1706045579361.png" alt="hogi_0-1706045579361.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Following an idea of&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;from &lt;LI-MESSAGE title="Add Counter for Unique Cases in Groups" uid="630320" url="https://community.jmp.com/t5/Discussions/Add-Counter-for-Unique-Cases-in-Groups/m-p/630320#U630320" 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;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "rank_unique (sex) by age",
	Formula(
		Col Minimum(
			Col Rank( If( Row() == Col Min( Row(), :age, :sex ), 1 ), :age ),
			:age,
			:sex
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;just a value for the first of each sex X age&lt;/LI&gt;&lt;LI&gt;generate rank&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;use Col Minimum to broadcast the values to the other rows&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 23 Jan 2024 22:01:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/new-column-rank-unique/m-p/718243#M90050</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-01-23T22:01:41Z</dc:date>
    </item>
  </channel>
</rss>

