<?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: Group values from selected rows in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761711#M93946</link>
    <description>Nice workaround :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;character "aggregations" like this one - with just a few mouse clicks?&lt;BR /&gt;&lt;BR /&gt;Here is the wish:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/JMP-Wish-List/Summary-and-Tabulate-add-aggregation-option-for-Character/idi-p/659314" target="_blank"&gt;https://community.jmp.com/t5/JMP-Wish-List/Summary-and-Tabulate-add-aggregation-option-for-Character/idi-p/659314&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Sun, 26 May 2024 14:16:00 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-05-26T14:16:00Z</dc:date>
    <item>
      <title>Group values from selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761526#M93939</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to group values from the selected rows&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the dt:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__2-1716652531125.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/64512i9F43751F1F7DC257/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__2-1716652531125.png" alt="Jackie__2-1716652531125.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The final output should look something like this. So combine the Product values with similar percent. Any suggestion?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__3-1716652549850.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/64513iC003AE3353CB59B8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__3-1716652549850.png" alt="Jackie__3-1716652549850.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Current Data Table();

dt &amp;lt;&amp;lt; select duplicate rows( Match( :Label, :Percent ) );

Try( dt&amp;lt;&amp;lt; delete rows );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 17:16:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761526#M93939</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-05-25T17:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Group values from selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761536#M93940</link>
      <description>&lt;P&gt;Closing this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is one way&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 = Current Data Table();
aa = Associative Array( :Percent &amp;lt;&amp;lt; get values );

For Each( {{key, value}}, aa, aa[key] = dt[Loc( dt[0, "Percent"], key ), "Product"] );

dt &amp;lt;&amp;lt; New Column( "Product Code Range", Character, Nominal, &amp;lt;&amp;lt;Set Each Value( Concat Items( aa[:Percent], ", " ) ) );

dt &amp;lt;&amp;lt; select duplicate rows( Match( :Label, :Percent ) );
Try( dt &amp;lt;&amp;lt; delete rows );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 22:39:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761536#M93940</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2024-05-25T22:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Group values from selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761537#M93941</link>
      <description>&lt;P&gt;Having done this kind of thing before, I suggest that you round the Percent column before grouping them.&amp;nbsp; Percent values of .5 and .5001 might be formatted to be displayed as .50 but they will create different groups.&amp;nbsp; Sometimes I have found that such a script will require not only the rounding, but also the converting to a character column for the code to be robust.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2024 22:32:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761537#M93941</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-05-25T22:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Group values from selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761711#M93946</link>
      <description>Nice workaround :)&lt;/img&gt;&lt;BR /&gt;&lt;BR /&gt;character "aggregations" like this one - with just a few mouse clicks?&lt;BR /&gt;&lt;BR /&gt;Here is the wish:&lt;BR /&gt;&lt;A href="https://community.jmp.com/t5/JMP-Wish-List/Summary-and-Tabulate-add-aggregation-option-for-Character/idi-p/659314" target="_blank"&gt;https://community.jmp.com/t5/JMP-Wish-List/Summary-and-Tabulate-add-aggregation-option-for-Character/idi-p/659314&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 26 May 2024 14:16:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761711#M93946</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-05-26T14:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Group values from selected rows</title>
      <link>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761794#M93954</link>
      <description>&lt;P&gt;I do this type of aggregations in JMP using SQL (and like Jim said, converting to characters (or rounding) most likely should be done. One of the reasons being&amp;nbsp;&lt;A href="https://0.30000000000000004.com/" target="_blank"&gt;Floating Point Math (30000000000000004.com)&lt;/A&gt;)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$DOWNLOADS/product_dt.jmp");

dt &amp;lt;&amp;lt; New Column("Selected", Numeric, Nominal, Formula(
	Selected()
));

dt_result = Query(
	Table(dt, "dt"),
	"\[
SELECT Percent, Label, GROUP_CONCAT(Product, ',') AS Product
FROM dt
WHERE Selected = 1
GROUP BY Percent, Label
	]\"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 May 2024 06:24:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Group-values-from-selected-rows/m-p/761794#M93954</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-05-27T06:24:20Z</dc:date>
    </item>
  </channel>
</rss>

